From 4d57b211e560c6d86df00cf74422023f90fd9599 Mon Sep 17 00:00:00 2001 From: mcguirepr89 Date: Fri, 18 Mar 2022 09:15:57 -0400 Subject: [PATCH] added total species count to sidebar overview --- scripts/overview.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/scripts/overview.php b/scripts/overview.php index 157b06d..977bae5 100644 --- a/scripts/overview.php +++ b/scripts/overview.php @@ -55,6 +55,14 @@ if($statement5 == False) { } $result5 = $statement5->execute(); $speciestally = $result5->fetchArray(SQLITE3_ASSOC); + +$statement6 = $db->prepare('SELECT COUNT(DISTINCT(Com_Name)) FROM detections'); +if($statement6 == False) { + echo "Database is busy"; + header("refresh: 0;"); +} +$result6 = $statement6->execute(); +$totalspeciestally = $result6->fetchArray(SQLITE3_ASSOC); ?> @@ -85,6 +93,12 @@ $speciestally = $result5->fetchArray(SQLITE3_ASSOC); + + Total Number of Species +
+ +
+