From 08e867c9c6394a2ff323a3323181ae9bf46d703b Mon Sep 17 00:00:00 2001 From: Muad Sakah Date: Sun, 2 Feb 2025 06:59:48 +0000 Subject: [PATCH] confirmed patricipants database done --- confirmed_participants.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/confirmed_participants.php b/confirmed_participants.php index b09870a5..d7eabec4 100644 --- a/confirmed_participants.php +++ b/confirmed_participants.php @@ -32,8 +32,8 @@ 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()>'" . $config['dates']['postparticipants'] . "') AS test"); -$q->execute(); +$q = $pdo->prepare("SELECT (NOW()>? AS test"); +$q->execute($config['dates']['postparticipants']); $r = $q->fetch(PDO::FETCH_OBJ); if ($r->test != 1) { list($d, $t) = explode(' ', $config['dates']['postparticipants']); @@ -56,16 +56,16 @@ if ($r->test != 1) { LEFT JOIN projectdivisions ON projectdivisions.id=projects.projectdivisions_id WHERE 1 - AND registrations.year='" . $config['FAIRYEAR'] . "' - AND projectcategories.year='" . $config['FAIRYEAR'] . "' - AND projectdivisions.year='" . $config['FAIRYEAR'] . "' + AND registrations.year=? + AND projectcategories.year=? + AND projectdivisions.year=? AND (status='complete' OR status='paymentpending') ORDER BY projectcategories.id, projectdivisions.id, projects.projectnumber "); - $q->execute(); + $q->execute([$config['FAIRYEAR'], $config['FAIRYEAR'], $config['FAIRYEAR']]); // Check for errors after the query execution $errorInfo = $pdo->errorInfo(); @@ -129,11 +129,11 @@ if ($r->test != 1) { FROM students,schools WHERE - students.registrations_id='$r->reg_id' + students.registrations_id=? AND students.schools_id=schools.id "); - $sq->execute(); + $sq->execute([$r->reg_id]); // Check for errors after the query execution $errorInfo = $pdo->errorInfo();