forked from science-ation/science-ation
Fix SQL queries syntax
This commit is contained in:
parent
a2d3e6112b
commit
4c4e6c4a1f
@ -37,8 +37,8 @@ while ($r = $q->fetch(PDO::FETCH_OBJ)) {
|
||||
$q2 = $pdo->prepare("SELECT committees_link.*,users.uid,MAX(users.year),users.lastname
|
||||
FROM committees_link LEFT JOIN users ON users.uid = committees_link.users_uid
|
||||
WHERE committees_id=?
|
||||
GROUP BY users.uid ORDER BY ord,users.lastname ");
|
||||
$q2->execute();
|
||||
GROUP BY users.uid ORDER BY ord,users.lastname");
|
||||
$q2->execute([$r->id]);
|
||||
// if there's nobody in this committee, then just skip it and go on to the next one.
|
||||
if ($q2->rowCount() == 0)
|
||||
continue;
|
||||
|
@ -32,7 +32,7 @@ send_header('Confirmed Participants');
|
||||
global $stats_totalstudents;
|
||||
// first, lets make sure someone isnt tryint to see something that they arent allowed to!
|
||||
|
||||
$q = $pdo->prepare("SELECT (NOW()>? AS test");
|
||||
$q = $pdo->prepare("SELECT (NOW()>?) AS test");
|
||||
$q->execute([$config['dates']['postparticipants']]);
|
||||
$r = $q->fetch(PDO::FETCH_OBJ);
|
||||
if ($r->test != 1) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user