if ($db->query("SELECT COUNT(*) FROM students")->fetch(PDO::FETCH_NUM)[0] == 0) {
block("red", "no students registered");
- break;
+ exit;
}
block("black", "summary of everything for " . date("d.m.Y H:i"));
- $result = $db->query("SELECT firstname, lastname, mnumber, blackboard FROM students ORDER BY lastname");
+ $result = $db->query("SELECT firstname, lastname, mnumber, blackboard FROM students ORDER BY LOWER(lastname)");
print "<table>";
print "<td><b>First name </b></td><td><b>Last name </b></td><td><b>Matr.nummer </b></td><td><b>Examples </b></td><td><b>Blackboard </b></td>";