From af8454598c204d5b32c6a33467086df5fd2dc3dc Mon Sep 17 00:00:00 2001 From: msquare Date: Wed, 13 Dec 2017 11:55:59 +0100 Subject: [PATCH] improve public dashboard --- includes/model/Stats.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/includes/model/Stats.php b/includes/model/Stats.php index 5618cdc6..c6208dc3 100644 --- a/includes/model/Stats.php +++ b/includes/model/Stats.php @@ -54,9 +54,7 @@ function stats_angels_needed_three_hours() - (SELECT COUNT(*) FROM `ShiftEntry` WHERE `ShiftEntry`.`SID`=`Shifts`.`SID` AND `freeloaded`=0) ) as `count` FROM `Shifts` - WHERE ((`end` > ? AND `end` < ?) OR (`start` > ? AND `start` < ?))", [ - $now, - $in3hours, + WHERE `end` > ? AND `start` < ?", [ $now, $in3hours ]); @@ -79,9 +77,7 @@ function stats_angels_needed_for_nightshifts() - (SELECT COUNT(*) FROM `ShiftEntry` WHERE `ShiftEntry`.`SID`=`Shifts`.`SID` AND `freeloaded`=0) ) as `count` FROM `Shifts` - WHERE ((`end` > ? AND `end` < ?) OR (`start` > ? AND `start` < ?))", [ - $night_start, - $night_end, + WHERE `end` > ? AND `start` < ?", [ $night_start, $night_end ]);