Properly rollover the schools, allow 'lastlogin' to be NULL

This commit is contained in:
james 2006-07-26 14:51:30 +00:00
parent ea82b61700
commit 1519b427d2
3 changed files with 7 additions and 2 deletions

View File

@ -232,8 +232,10 @@
$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_query("INSERT INTO schools (school,board,district,phone,fax,address,city,province_code,postalcode,sciencehead,scienceheademail,scienceheadphone,accesscode,lastlogin,junior,intermediate,senior,registration_password,projectlimit,projectlimitper,year) VALUES (
'".mysql_escape_string($r->school)."',
'".mysql_escape_string($r->board)."',
'".mysql_escape_string($r->district)."',
'".mysql_escape_string($r->phone)."',
'".mysql_escape_string($r->fax)."',
'".mysql_escape_string($r->address)."',
@ -249,6 +251,8 @@
'".mysql_escape_string($r->intermediate)."',
'".mysql_escape_string($r->senior)."',
'".mysql_escape_string($r->registration_password)."',
'".mysql_escape_string($r->projectlimit)."',
'".mysql_escape_string($r->projectlimitper)."',
'".mysql_escape_string($newfairyear)."')");
echo i18n("Rolling questions")."<br />";

View File

@ -1 +1 @@
18
19

1
db/db.update.19.sql Normal file
View File

@ -0,0 +1 @@
ALTER TABLE `schools` CHANGE `lastlogin` `lastlogin` DATETIME NULL;