From 5c9920cfabbecbdced6571512322b04b39571b02 Mon Sep 17 00:00:00 2001 From: james Date: Mon, 16 Oct 2006 03:34:57 +0000 Subject: [PATCH] update scripts for 2007, also append the language to the end of the project title, so its easier to tell if a language is english of french --- scripts/judges_fake.php | 6 +++--- scripts/populate_fake.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/judges_fake.php b/scripts/judges_fake.php index e645d53..52f5e36 100644 --- a/scripts/judges_fake.php +++ b/scripts/judges_fake.php @@ -117,18 +117,18 @@ for($x=0;$x<$numjudges;$x++) for($a=1;$a<=3;$a++) { $catrank=rand(-2,2); - mysql_query("INSERT INTO judges_catpref (judges_id,projectcategories_id,rank,year) VALUES ('$id','$a','$catrank','2006')"); + mysql_query("INSERT INTO judges_catpref (judges_id,projectcategories_id,rank,year) VALUES ('$id','$a','$catrank','2007')"); } //expertise is ranked 1-5 for($a=1;$a<=6;$a++) { $divrank=rand(1,5); - mysql_query("INSERT INTO judges_expertise (judges_id,projectdivisions_id,val,year) VALUES ('$id','$a','$divrank','2006')"); + mysql_query("INSERT INTO judges_expertise (judges_id,projectdivisions_id,val,year) VALUES ('$id','$a','$divrank','2007')"); } //and add the record to the judges_years table so they will be 'active' for this year - mysql_query("INSERT INTO judges_years (judges_id,year) VALUES ('$id','2006')"); + mysql_query("INSERT INTO judges_years (judges_id,year) VALUES ('$id','2007')"); //60% chance they only speak english //20% chance they only speak french diff --git a/scripts/populate_fake.php b/scripts/populate_fake.php index 43a3456..a0e7434 100644 --- a/scripts/populate_fake.php +++ b/scripts/populate_fake.php @@ -101,7 +101,7 @@ for($x=0;$x<$numprojects;$x++) if($langnum<4) $lang="fr"; else $lang="en"; - mysql_query("INSERT INTO projects (registrations_id,projectcategories_id,projectdivisions_id,title,year,req_electricity,req_table,language) VALUES ('$id','$cat','$div','$title',2007,'$req_e','$req_t','$lang')"); + mysql_query("INSERT INTO projects (registrations_id,projectcategories_id,projectdivisions_id,title,year,req_electricity,req_table,language) VALUES ('$id','$cat','$div','$title $lang',2007,'$req_e','$req_t','$lang')"); } }