Update confirmed participants page from students table to users table

This commit is contained in:
james 2011-03-27 16:49:22 +00:00
parent 3e290af2dc
commit ade9e1b876

View File

@ -116,18 +116,17 @@
echo "<td>$r->projectnumber</td>"; echo "<td>$r->projectnumber</td>";
echo "<td>$r->title</td>"; echo "<td>$r->title</td>";
$sq=mysql_query("SELECT students.firstname, $sq=mysql_query("SELECT users.firstname,
students.lastname, users.lastname,
students.id, users.id,
students.webfirst, users.webfirst,
students.weblast, users.weblast,
schools.school schools.school
FROM FROM
students,schools users
JOIN schools ON users.schools_id=schools.id
WHERE WHERE
students.registrations_id='$r->reg_id' users.registrations_id='$r->reg_id'
AND
students.schools_id=schools.id
"); ");
echo mysql_error(); echo mysql_error();
@ -138,15 +137,15 @@
$lastschool=""; $lastschool="";
while($studentinfo=mysql_fetch_object($sq)) while($studentinfo=mysql_fetch_object($sq))
{ {
if($studentinfo->webfirst=="yes") if($studentinfo->webfirst!="no")
$students.="$studentinfo->firstname "; $students.="$studentinfo->firstname ";
if($studentinfo->weblast=="yes") if($studentinfo->weblast!="no")
$students.="$studentinfo->lastname "; $students.="$studentinfo->lastname ";
if($r->studentinfo->webfirst=="yes" || $studentinfo->weblast=="yes") $students.="<br />"; if($r->studentinfo->webfirst=="no" && $studentinfo->weblast!="no")
$students.="<br />";
$schools.="$studentinfo->school <br />"; $schools.="$studentinfo->school <br />";
if($lastschool) if($lastschool) {
{
if($lastschool!=$studentinfo->school) if($lastschool!=$studentinfo->school)
$sameschools=false; $sameschools=false;
} }