From 3362e14b4e41a10f006a8a36362ec6ca5c5b18e5 Mon Sep 17 00:00:00 2001 From: james Date: Thu, 24 Nov 2005 20:12:43 +0000 Subject: [PATCH] Also rollover the schools, when we do the fairyear rollover --- config/rollover.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/config/rollover.php b/config/rollover.php index d2021cd..146d130 100644 --- a/config/rollover.php +++ b/config/rollover.php @@ -225,6 +225,30 @@ '".mysql_escape_string($r->order)."', '".mysql_escape_string($newfairyear)."')"); + echo i18n("Rolling schools")."
"; + //award types + $q=mysql_query("SELECT * FROM schools WHERE year='$currentfairyear'"); + echo mysql_error(); + while($r=mysql_fetch_object($q)) + mysql_query("INSERT INTO schools (school,phone,fax,address,city,province_code,postalcode,sciencehead,scienceheademail,scienceheadphone,accesscode,lastlogin,junior,intermediate,senior,registration_password,year) VALUES ( + '".mysql_escape_string($r->school)."', + '".mysql_escape_string($r->phone)."', + '".mysql_escape_string($r->fax)."', + '".mysql_escape_string($r->address)."', + '".mysql_escape_string($r->city)."', + '".mysql_escape_string($r->province_code)."', + '".mysql_escape_string($r->postalcode)."', + '".mysql_escape_string($r->sciencehead)."', + '".mysql_escape_string($r->scienceheademail)."', + '".mysql_escape_string($r->scienceheadphone)."', + '".mysql_escape_string($r->accesscode)."', + NULL, + '".mysql_escape_string($r->junior)."', + '".mysql_escape_string($r->intermediate)."', + '".mysql_escape_string($r->senior)."', + '".mysql_escape_string($r->registration_password)."', + '".mysql_escape_string($newfairyear)."')"); + echo "
"; echo "
"; mysql_query("UPDATE config SET val='$newfairyear' WHERE var='FAIRYEAR' AND year=0");