A live bird collage card for your Home Assistant dashboard.
limit database view to just today's detections
Patrick McGuire69943ab685c8
diff --git a/scripts/viewdb.php b/scripts/viewdb.phpindex 9b55c4c6..1e4b94ba 100644--- a/scripts/viewdb.php+++ b/scripts/viewdb.php@@ -16,14 +16,14 @@ if ($mysqli->connect_error) {}// SQL query to select data from database-$sql = "SELECT * FROM detections- ORDER BY Date DESC, Time DESC";+$sql = "SELECT * FROM detections+ ORDER BY Date DESC, Time DESC";$fulltable = $mysqli->query($sql);$totalcount=mysqli_num_rows($fulltable);$sql1 = "SELECT * FROM detections- ORDER BY Date DESC, Time DESC- LIMIT 500";+ WHERE Date = CURDATE()+ ORDER BY Date DESC, Time DESC";$mosttable = $mysqli->query($sql1);$sql2 = "SELECT * FROM detections