forked from science-ation/science-ation
Also rollover the schools, when we do the fairyear rollover
This commit is contained in:
parent
288dd58c9c
commit
3362e14b4e
@ -225,6 +225,30 @@
|
||||
'".mysql_escape_string($r->order)."',
|
||||
'".mysql_escape_string($newfairyear)."')");
|
||||
|
||||
echo i18n("Rolling schools")."<br />";
|
||||
//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 "<br />";
|
||||
echo "<br />";
|
||||
mysql_query("UPDATE config SET val='$newfairyear' WHERE var='FAIRYEAR' AND year=0");
|
||||
|
Loading…
Reference in New Issue
Block a user