Update weekly_report.php

This commit is contained in:
lloydbayley
2023-05-03 23:01:39 +10:00
parent 0570e9b093
commit 743074b9df
+5 -1
View File
@@ -210,7 +210,11 @@ while($detection=$result1->fetchArray(SQLITE3_ASSOC))
$totalcount = $result2->fetchArray(SQLITE3_ASSOC);
$priorweekcount = $totalcount['COUNT(*)'];
$percentagediff = round( (($scount - $priorweekcount) / $priorweekcount) * 100 );
if ($priorweekcount > 0) {
$percentagediff = round( (($scount - $priorweekcount) / $priorweekcount) * 100 );
} else {
$percentagediff = 0;
}
if($percentagediff > 0) {
$percentagediff = "<span style='color:green;font-size:small'>+".$percentagediff."%</span>";