X-Git-Url: https://git.treefish.org/banana.git/blobdiff_plain/3f75cb10d008938dca476577d6256765093d1932..17d5ad30f747658451fae84fe65cb1f5b66d377c:/admin/blackboard.php diff --git a/admin/blackboard.php b/admin/blackboard.php index b683221..4066f84 100644 --- a/admin/blackboard.php +++ b/admin/blackboard.php @@ -8,6 +8,11 @@ block("lightgreen", "added blackboard"); } + if ($db->query("SELECT COUNT(*) FROM students")->fetch(PDO::FETCH_NUM)[0] == 0) { + block("red", "no students registered"); + break; + } + block("black", "add blackboard"); ?>