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;
|
global $stats_totalstudents;
|
||||||
// first, lets make sure someone isnt tryint to see something that they arent allowed to!
|
// 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 = $pdo->prepare("SELECT (NOW()>? AS test");
|
||||||
$q->execute();
|
$q->execute($config['dates']['postparticipants']);
|
||||||
$r = $q->fetch(PDO::FETCH_OBJ);
|
$r = $q->fetch(PDO::FETCH_OBJ);
|
||||||
if ($r->test != 1) {
|
if ($r->test != 1) {
|
||||||
list($d, $t) = explode(' ', $config['dates']['postparticipants']);
|
list($d, $t) = explode(' ', $config['dates']['postparticipants']);
|
||||||
@ -56,16 +56,16 @@ if ($r->test != 1) {
|
|||||||
LEFT JOIN projectdivisions ON projectdivisions.id=projects.projectdivisions_id
|
LEFT JOIN projectdivisions ON projectdivisions.id=projects.projectdivisions_id
|
||||||
WHERE
|
WHERE
|
||||||
1
|
1
|
||||||
AND registrations.year='" . $config['FAIRYEAR'] . "'
|
AND registrations.year=?
|
||||||
AND projectcategories.year='" . $config['FAIRYEAR'] . "'
|
AND projectcategories.year=?
|
||||||
AND projectdivisions.year='" . $config['FAIRYEAR'] . "'
|
AND projectdivisions.year=?
|
||||||
AND (status='complete' OR status='paymentpending')
|
AND (status='complete' OR status='paymentpending')
|
||||||
ORDER BY
|
ORDER BY
|
||||||
projectcategories.id,
|
projectcategories.id,
|
||||||
projectdivisions.id,
|
projectdivisions.id,
|
||||||
projects.projectnumber
|
projects.projectnumber
|
||||||
");
|
");
|
||||||
$q->execute();
|
$q->execute([$config['FAIRYEAR'], $config['FAIRYEAR'], $config['FAIRYEAR']]);
|
||||||
|
|
||||||
// Check for errors after the query execution
|
// Check for errors after the query execution
|
||||||
$errorInfo = $pdo->errorInfo();
|
$errorInfo = $pdo->errorInfo();
|
||||||
@ -129,11 +129,11 @@ if ($r->test != 1) {
|
|||||||
FROM
|
FROM
|
||||||
students,schools
|
students,schools
|
||||||
WHERE
|
WHERE
|
||||||
students.registrations_id='$r->reg_id'
|
students.registrations_id=?
|
||||||
AND
|
AND
|
||||||
students.schools_id=schools.id
|
students.schools_id=schools.id
|
||||||
");
|
");
|
||||||
$sq->execute();
|
$sq->execute([$r->reg_id]);
|
||||||
|
|
||||||
// Check for errors after the query execution
|
// Check for errors after the query execution
|
||||||
$errorInfo = $pdo->errorInfo();
|
$errorInfo = $pdo->errorInfo();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user