From 1deb1255eafc5978d5b7abc044df48efbf9bffde Mon Sep 17 00:00:00 2001 From: mcguirepr89 Date: Tue, 8 Feb 2022 20:38:33 -0500 Subject: [PATCH] the sql was wrong for this --- scripts/overview.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/overview.php b/scripts/overview.php index 6425c18..cc6df56 100644 --- a/scripts/overview.php +++ b/scripts/overview.php @@ -31,10 +31,12 @@ $sql3 = "SELECT COUNT(*) AS 'Total' FROM detections AND Time >= DATE_SUB(NOW(),INTERVAL 1 HOUR)"; $lasthourcount = $mysqli->query($sql3); -$sql4 = "SELECT COUNT(Com_Name) AS 'Total' +$sql4 = "SELECT Com_Name FROM detections - WHERE Date = CURDATE()"; -$speciescount = $mysqli->query($sql4); + WHERE Date = CURDATE() + GROUP BY Com_Name"; +$specieslist = $mysqli->query($sql4); +$speciescount = mysqli_num_rows($specieslist); $mysqli->close(); ?> @@ -110,7 +112,7 @@ while($rows=$mostrecent ->fetch_assoc()) - +
Species Detected Todayfetch_assoc()) { echo $row['Total']; };?>