prepare('SELECT COUNT(*) FROM detections'); if($statement == False) { echo "Database is busy"; header("refresh: 0;"); } $result = $statement->execute(); $totalcount = $result->fetchArray(SQLITE3_ASSOC); $statement2 = $db->prepare('SELECT COUNT(*) FROM detections WHERE Date == DATE(\'now\', \'localtime\')'); if($statement2 == False) { echo "Database is busy"; header("refresh: 0;"); } $result2 = $statement2->execute(); $todaycount = $result2->fetchArray(SQLITE3_ASSOC); $statement3 = $db->prepare('SELECT COUNT(*) FROM detections WHERE Date == Date(\'now\', \'localtime\') AND TIME >= TIME(\'now\', \'localtime\', \'-1 hour\')'); if($statement3 == False) { echo "Database is busy"; header("refresh: 0;"); } $result3 = $statement3->execute(); $hourcount = $result3->fetchArray(SQLITE3_ASSOC); $statement4 = $db->prepare('SELECT Com_Name, Sci_Name, Date, Time, Confidence, File_Name FROM detections ORDER BY Date DESC, Time DESC LIMIT 1'); if($statement4 == False) { echo "Database is busy"; header("refresh: 0;"); } $result4 = $statement4->execute(); $mostrecent = $result4->fetchArray(SQLITE3_ASSOC); $comname = preg_replace('/ /', '_', $mostrecent['Com_Name']); $sciname = preg_replace('/ /', '_', $mostrecent['Sci_Name']); $comname = preg_replace('/\'/', '', $comname); $filename = "/By_Date/".$mostrecent['Date']."/".$comname."/".$mostrecent['File_Name']; $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); ?> Overview
Total
Today
Last Hour
Species Detected Today


"; } else { echo "

No Detections For Today

"; } ?>

Most Recent Detection:


Confidence:

Currently Analyzing