From ade9e1b8768b69e1efd00756acf3557c3f904020 Mon Sep 17 00:00:00 2001 From: james Date: Sun, 27 Mar 2011 16:49:22 +0000 Subject: [PATCH] Update confirmed participants page from students table to users table --- confirmed_participants.php | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/confirmed_participants.php b/confirmed_participants.php index e653d67..dd77a7c 100644 --- a/confirmed_participants.php +++ b/confirmed_participants.php @@ -116,18 +116,17 @@ echo "$r->projectnumber"; echo "$r->title"; - $sq=mysql_query("SELECT students.firstname, - students.lastname, - students.id, - students.webfirst, - students.weblast, + $sq=mysql_query("SELECT users.firstname, + users.lastname, + users.id, + users.webfirst, + users.weblast, schools.school FROM - students,schools + users + JOIN schools ON users.schools_id=schools.id WHERE - students.registrations_id='$r->reg_id' - AND - students.schools_id=schools.id + users.registrations_id='$r->reg_id' "); echo mysql_error(); @@ -138,15 +137,15 @@ $lastschool=""; while($studentinfo=mysql_fetch_object($sq)) { - if($studentinfo->webfirst=="yes") + if($studentinfo->webfirst!="no") $students.="$studentinfo->firstname "; - if($studentinfo->weblast=="yes") + if($studentinfo->weblast!="no") $students.="$studentinfo->lastname "; - if($r->studentinfo->webfirst=="yes" || $studentinfo->weblast=="yes") $students.="
"; + if($r->studentinfo->webfirst=="no" && $studentinfo->weblast!="no") + $students.="
"; $schools.="$studentinfo->school
"; - if($lastschool) - { + if($lastschool) { if($lastschool!=$studentinfo->school) $sameschools=false; }