diff --git a/committees.php b/committees.php index fea0d251..74d1010a 100644 --- a/committees.php +++ b/committees.php @@ -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; diff --git a/confirmed_participants.php b/confirmed_participants.php index 9a42760d..92de88b0 100644 --- a/confirmed_participants.php +++ b/confirmed_participants.php @@ -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) {