improve public dashboard

main
msquare 7 years ago
parent 582b1a739a
commit af8454598c

@ -54,9 +54,7 @@ function stats_angels_needed_three_hours()
- (SELECT COUNT(*) FROM `ShiftEntry` WHERE `ShiftEntry`.`SID`=`Shifts`.`SID` AND `freeloaded`=0) - (SELECT COUNT(*) FROM `ShiftEntry` WHERE `ShiftEntry`.`SID`=`Shifts`.`SID` AND `freeloaded`=0)
) as `count` ) as `count`
FROM `Shifts` FROM `Shifts`
WHERE ((`end` > ? AND `end` < ?) OR (`start` > ? AND `start` < ?))", [ WHERE `end` > ? AND `start` < ?", [
$now,
$in3hours,
$now, $now,
$in3hours $in3hours
]); ]);
@ -79,9 +77,7 @@ function stats_angels_needed_for_nightshifts()
- (SELECT COUNT(*) FROM `ShiftEntry` WHERE `ShiftEntry`.`SID`=`Shifts`.`SID` AND `freeloaded`=0) - (SELECT COUNT(*) FROM `ShiftEntry` WHERE `ShiftEntry`.`SID`=`Shifts`.`SID` AND `freeloaded`=0)
) as `count` ) as `count`
FROM `Shifts` FROM `Shifts`
WHERE ((`end` > ? AND `end` < ?) OR (`start` > ? AND `start` < ?))", [ WHERE `end` > ? AND `start` < ?", [
$night_start,
$night_end,
$night_start, $night_start,
$night_end $night_end
]); ]);

Loading…
Cancel
Save