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; }