Update weekly_report.php
This commit is contained in:
@@ -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>";
|
||||
|
||||
Reference in New Issue
Block a user