From e01542612091e1e5360cedcdc988fb8225bc4bfc Mon Sep 17 00:00:00 2001 From: mcguirepr89 Date: Tue, 22 Feb 2022 14:56:53 -0500 Subject: [PATCH] updating play.php --- scripts/play.php | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/scripts/play.php b/scripts/play.php index 311e435..24e6b53 100644 --- a/scripts/play.php +++ b/scripts/play.php @@ -9,12 +9,23 @@ if($db == False){ header("refresh: 0;"); } +if(isset($_POST['bydate'])){ +$statement = $db->prepare('SELECT DISTINCT(Date), Com_Name from detections GROUP BY Date'); +if($statement == False){ + echo "Database is busy"; + header("refresh: 0;"); +} +$result = $statement->execute(); +$view = "bydate"; +} else { $statement = $db->prepare('SELECT DISTINCT(Com_Name) from detections ORDER BY Com_Name'); if($statement == False){ echo "Database is busy"; header("refresh: 0;"); } $result = $statement->execute(); +$view = "byspecies"; +} ?> @@ -38,7 +49,13 @@ while($results=$result->fetchArray(SQLITE3_ASSOC))
- +$date";} +else { + $name = $results['Com_Name']; + echo "";}?>