forked from science-ation/science-ation
confirmed patricipants database done
This commit is contained in:
parent
84ad60dea1
commit
08e867c9c6
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user