diff --git a/lc-honor-www/index.php b/lc-honor-www/index.php new file mode 100644 index 0000000000000000000000000000000000000000..e59c2cb5c0ebc337669df805677fbbcb2163c1d3 --- /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