From 31fc7a0866004af30435931c81555b77b87d5406 Mon Sep 17 00:00:00 2001 From: james Date: Wed, 25 Oct 2006 01:16:48 +0000 Subject: [PATCH] Update the rollover script to rollover the new fields that were added recently --- config/rollover.php | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/config/rollover.php b/config/rollover.php index 5c93ee73..0ac01279 100644 --- a/config/rollover.php +++ b/config/rollover.php @@ -151,14 +151,16 @@ echo mysql_error(); while($r=mysql_fetch_object($q)) { - mysql_query("INSERT INTO award_awards (award_sponsors_id,award_types_id,name,criteria,presenter,`order`,year) VALUES ( + mysql_query("INSERT INTO award_awards (award_sponsors_id,award_types_id,name,criteria,presenter,`order`,year,excludefromac,cwsfaward) VALUES ( '".mysql_escape_string($r->award_sponsors_id)."', '".mysql_escape_string($r->award_types_id)."', '".mysql_escape_string($r->name)."', '".mysql_escape_string($r->criteria)."', '".mysql_escape_string($r->presenter)."', '".mysql_escape_string($r->order)."', - '".mysql_escape_string($newfairyear)."')"); + '".mysql_escape_string($newfairyear)."', + '".mysql_escape_string($r->excludefromac)."', + '".mysql_escape_string($r->cwsfaward)."')"); $award_awards_id=mysql_insert_id(); $q2=mysql_query("SELECT * FROM award_awards_projectcategories WHERE year='$currentfairyear' AND award_awards_id='$r->id'"); @@ -188,14 +190,16 @@ echo mysql_error(); while($r2=mysql_fetch_object($q2)) { - mysql_query("INSERT INTO award_prizes (award_awards_id,cash,scholarship,prize,number,`order`,year) VALUES ( + mysql_query("INSERT INTO award_prizes (award_awards_id,cash,scholarship,`value`,prize,number,`order`,year,excludefromac) VALUES ( '".mysql_escape_string($award_awards_id)."', '".mysql_escape_string($r2->cash)."', '".mysql_escape_string($r2->scholarship)."', + '".mysql_escape_string($r2->value)."', '".mysql_escape_string($r2->prize)."', '".mysql_escape_string($r2->number)."', '".mysql_escape_string($r2->order)."', - '".mysql_escape_string($newfairyear)."')"); + '".mysql_escape_string($newfairyear)."', + ".mysql_escape_string($r2->excludefromac)."')"); } } @@ -204,10 +208,12 @@ $q=mysql_query("SELECT * FROM award_contacts WHERE year='$currentfairyear'"); echo mysql_error(); while($r=mysql_fetch_object($q)) - mysql_query("INSERT INTO award_contacts (award_sponsors_id,firstname,lastname,email,phonehome,phonework,phonecell,fax,notes,year) VALUES ( + mysql_query("INSERT INTO award_contacts (award_sponsors_id,salutation,firstname,lastname,position,email,phonehome,phonework,phonecell,fax,notes,year) VALUES ( '".mysql_escape_string($r->award_sponsors_id)."', + '".mysql_escape_string($r->salutation)."', '".mysql_escape_string($r->firstname)."', '".mysql_escape_string($r->lastname)."', + '".mysql_escape_string($r->position)."', '".mysql_escape_string($r->email)."', '".mysql_escape_string($r->phonehome)."', '".mysql_escape_string($r->phonework)."', @@ -232,8 +238,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,board,district,phone,fax,address,city,province_code,postalcode,sciencehead,scienceheademail,scienceheadphone,accesscode,lastlogin,junior,intermediate,senior,registration_password,projectlimit,projectlimitper,year) VALUES ( + mysql_query("INSERT INTO schools (school,schoollang,schoollevel,board,district,phone,fax,address,city,province_code,postalcode,principal,schoolemail,sciencehead,scienceheademail,scienceheadphone,accesscode,lastlogin,junior,intermediate,senior,registration_password,projectlimit,projectlimitper,year) VALUES ( '".mysql_escape_string($r->school)."', + '".mysql_escape_string($r->schoollang)."', + '".mysql_escape_string($r->schoollevel)."', '".mysql_escape_string($r->board)."', '".mysql_escape_string($r->district)."', '".mysql_escape_string($r->phone)."', @@ -242,6 +250,8 @@ '".mysql_escape_string($r->city)."', '".mysql_escape_string($r->province_code)."', '".mysql_escape_string($r->postalcode)."', + '".mysql_escape_string($r->principal)."', + '".mysql_escape_string($r->schoolemail)."', '".mysql_escape_string($r->sciencehead)."', '".mysql_escape_string($r->scienceheademail)."', '".mysql_escape_string($r->scienceheadphone)."',