Fix SQL queries syntax

This commit is contained in:
patrick 2025-02-10 14:00:51 +00:00
parent a2d3e6112b
commit 4c4e6c4a1f
2 changed files with 3 additions and 3 deletions

View File

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

View File

@ -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) {