forgot to include these 2 files in the previous regisration commit

This commit is contained in:
Muad Sakah 2025-02-07 03:57:54 +00:00
parent 2a8bb8209f
commit e3d16a4c57
2 changed files with 27 additions and 26 deletions

View File

@ -444,29 +444,30 @@ function list_query($year, $wherestatus, $reg_id)
$fair = "AND projects.fairs_id='{$_SESSION['fairs_id']}'"; $fair = "AND projects.fairs_id='{$_SESSION['fairs_id']}'";
} }
$q = $pdo->prepare("SELECT registrations.id AS reg_id, $q = $pdo->prepare("
registrations.num AS reg_num, SELECT
registrations.status, registrations.id AS reg_id,
registrations.email, registrations.num AS reg_num,
projects.title, registrations.status,
projects.projectnumber, registrations.email,
projects.projectcategories_id, projects.title,
projects.projectdivisions_id, projects.projectnumber,
projects.feedback, projects.projectcategories_id,
projects.flagged projects.projectdivisions_id,
FROM projects.feedback,
registrations projects.flagged
left outer join projects on projects.registrations_id=registrations.id FROM
WHERE registrations
1 LEFT OUTER JOIN projects ON projects.registrations_id = registrations.id
AND registrations.year=? WHERE
? registrations.year = ?
? ? AND registrations.status = ?
ORDER BY AND registrations.num = ?
registrations.status DESC, projects.title AND registrations.fair = ?
"); ORDER BY
registrations.status DESC, projects.title ");
$q->execute([$year, $wherestatus, $reg, $fair]);
$q->execute([$year,$wherestatus,$reg,$fair]);
// FIXME // FIXME
show_pdo_errors_if_any($pdo); show_pdo_errors_if_any($pdo);

View File

@ -133,12 +133,12 @@ $q = $pdo->prepare("SELECT registrations.id AS reg_id,
left outer join projects on projects.registrations_id=registrations.id left outer join projects on projects.registrations_id=registrations.id
WHERE WHERE
1 1
AND registrations.year=? AND registrations.year=?,
? $wherestatus
ORDER BY ORDER BY
? $ORDERBY
"); ");
$q->execute([$year,$wherestatus,$ORDERBY]); $q->execute([$year]);
show_pdo_errors_if_any($pdo); show_pdo_errors_if_any($pdo);
$stats_totalprojects = 0; $stats_totalprojects = 0;