From dec3547eb6eb944a67da5e8837200a6b7f6d5d80 Mon Sep 17 00:00:00 2001 From: aleigh Date: Mon, 30 May 2022 19:28:24 -0700 Subject: [PATCH] lc-honor-www: Added this project --- lc-honor-www/index.php | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 lc-honor-www/index.php diff --git a/lc-honor-www/index.php b/lc-honor-www/index.php new file mode 100644 index 000000000..e59c2cb5c --- /dev/null +++ b/lc-honor-www/index.php @@ -0,0 +1,34 @@ + + + + + + LEIGH&CO Awards + + + + + +

LEIGH&CO Leaderboard

+
+ +error); +$q = "select first_name,last_name,label as award_label,count(*) as cnt from (select last_name, first_name, label, b.id from award_t a, person_t b, award_grant_t c where a.id = c.award_id and b.id = c.person_id) a group by id, label order by last_name,first_name,award_label"; +$sql_query = $conn->prepare($q) or die($conn->error); +$sql_query->execute() or die($conn->error); +$result = $sql_query->get_result(); +$item = $result->fetch_all(MYSQLI_ASSOC); + +$last = ""; +foreach ($item as $row) { + $fullName = $row['last_name'] . ', ' . $row['first_name'] . '
'; + if ($fullName !== $last) { + print("

$fullName

"); + } + $last = $fullName; + print($row[cnt] . 'x ' . $row[award_label] . '
'); +} +?> + + \ No newline at end of file -- GitLab