diff --git a/homepage/style.css b/homepage/style.css index 517d507..1e6799f 100644 --- a/homepage/style.css +++ b/homepage/style.css @@ -48,6 +48,7 @@ td { } th { + padding: 12px; font-weight: bold; height: auto; text-align: center; diff --git a/scripts/todays_detections.php b/scripts/todays_detections.php index dbdd8b9..8ed2eee 100644 --- a/scripts/todays_detections.php +++ b/scripts/todays_detections.php @@ -48,13 +48,22 @@ if($statement4 == False){ $result4 = $statement4->execute(); $mostrecent = $result4->fetchArray(SQLITE3_ASSOC); -$statement5 = $db->prepare('SELECT COUNT(DISTINCT(Com_Name)) FROM detections'); -if($statement4 == False){ +$statement5 = $db->prepare('SELECT COUNT(DISTINCT(Com_Name)) FROM detections WHERE Date == Date(\'now\', \'localtime\')'); +if($statement5 == False){ echo "Database is busy"; header("refresh: 0;"); } $result5 = $statement5->execute(); -$speciestally = $result5->fetchArray(SQLITE3_ASSOC); +$todayspeciestally = $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); + ?> @@ -75,7 +84,8 @@ $speciestally = $result5->fetchArray(SQLITE3_ASSOC);