forked from science-ation/science-ation
update 'fake data' scripts for 2006
This commit is contained in:
parent
635d0b6e2d
commit
45f4581dc4
@ -24,7 +24,7 @@
|
||||
<?
|
||||
include "../common.inc.php";
|
||||
|
||||
$projq=mysql_query("SELECT id FROM registrations WHERE status='complete'");
|
||||
$projq=mysql_query("SELECT id FROM registrations WHERE status='complete' AND year='2006'");
|
||||
while($projr=mysql_fetch_object($projq))
|
||||
{
|
||||
$reg_id=$projr->id;
|
||||
|
@ -55,7 +55,7 @@ for($x=0;$x<$numprojects;$x++)
|
||||
$pd=rand(1,$prob_unpaid);
|
||||
if($pd==1) $status='paymentpending'; else $status='complete';
|
||||
|
||||
$q=mysql_query("INSERT INTO registrations (num,email,start,status,year) VALUES ('$regnum','$email',NOW(),'$status',2005)");
|
||||
$q=mysql_query("INSERT INTO registrations (num,email,start,status,year) VALUES ('$regnum','$email',NOW(),'$status',2006)");
|
||||
if($id=mysql_insert_id())
|
||||
{
|
||||
|
||||
@ -73,7 +73,7 @@ for($x=0;$x<$numprojects;$x++)
|
||||
$sexnum=rand(1,3);
|
||||
if($sexnum<3) $sex="male"; else $sex="female";
|
||||
|
||||
mysql_query("INSERT INTO students (registrations_id,firstname,lastname,sex,grade,year,schools_id) VALUES ('$id','".getrand($firstnames)."','".getrand($lastnames)."','$sex','$grade',2005,'$schools_id')");
|
||||
mysql_query("INSERT INTO students (registrations_id,firstname,lastname,sex,grade,year,schools_id) VALUES ('$id','".getrand($firstnames)."','".getrand($lastnames)."','$sex','$grade',2006,'$schools_id')");
|
||||
|
||||
}
|
||||
|
||||
@ -87,7 +87,7 @@ for($x=0;$x<$numprojects;$x++)
|
||||
if($req_tnum==1) $req_t="no"; else $req_t="yes";
|
||||
|
||||
|
||||
mysql_query("INSERT INTO projects (registrations_id,projectcategories_id,projectdivisions_id,title,year,req_electricity,req_table) VALUES ('$id','$cat','$div','$title',2005,'$req_e','$req_t')");
|
||||
mysql_query("INSERT INTO projects (registrations_id,projectcategories_id,projectdivisions_id,title,year,req_electricity,req_table) VALUES ('$id','$cat','$div','$title',2006,'$req_e','$req_t')");
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user