From eeefcf2cfc7e347135d708e5737f9cafa8b5840f Mon Sep 17 00:00:00 2001 From: Patrick McGuire Date: Thu, 14 Oct 2021 14:35:17 -0400 Subject: [PATCH] better viewdb.php --- scripts/viewdb.php | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/scripts/viewdb.php b/scripts/viewdb.php index 0d0d979..6f87301 100644 --- a/scripts/viewdb.php +++ b/scripts/viewdb.php @@ -38,6 +38,13 @@ $sql4 = "SELECT Com_Name, Date, Time, MAX(Confidence) $specieslist = $mysqli->query($sql4); $speciescount=mysqli_num_rows($specieslist); +$sql5 = "SELECT Com_Name,COUNT(*) + AS Total + FROM detections + GROUP BY Com_Name + ORDER BY MAX(Confidence) DESC"; +$speciestally = $mysqli->query($sql5); + $mysqli->close(); ?> @@ -130,6 +137,8 @@ $mysqli->close(); +
+

Detected Species

@@ -142,16 +151,39 @@ $mysqli->close(); while($rows=$specieslist ->fetch_assoc()) { ?> + +
- +
+
+

Species stats

+ + + + + +fetch_assoc()) +{ +?> + + + + + +
SpeciesNumber of Detections
+
+

BirdsDB Detections Table