api all shifts export should only show needed angeltypes with count greater than 0
This commit is contained in:
parent
4aa85a3ff2
commit
3bc9d09f7a
|
@ -10,8 +10,9 @@ function NeededAngelTypes_by_shift($shift) {
|
||||||
SELECT `NeededAngelTypes`.*, `AngelTypes`.`name`, `AngelTypes`.`restricted`
|
SELECT `NeededAngelTypes`.*, `AngelTypes`.`name`, `AngelTypes`.`restricted`
|
||||||
FROM `NeededAngelTypes`
|
FROM `NeededAngelTypes`
|
||||||
JOIN `AngelTypes` ON `AngelTypes`.`id` = `NeededAngelTypes`.`angel_type_id`
|
JOIN `AngelTypes` ON `AngelTypes`.`id` = `NeededAngelTypes`.`angel_type_id`
|
||||||
WHERE `shift_id`=" . sql_escape($shift['SID']) . "
|
WHERE (`shift_id`=" . sql_escape($shift['SID']) . "
|
||||||
OR `room_id`=" . sql_escape($shift['RID']) . "
|
OR `room_id`=" . sql_escape($shift['RID']) . ")
|
||||||
|
AND `count` > 0
|
||||||
ORDER BY `room_id` DESC
|
ORDER BY `room_id` DESC
|
||||||
");
|
");
|
||||||
if ($needed_angeltypes_source === false)
|
if ($needed_angeltypes_source === false)
|
||||||
|
|
Loading…
Reference in New Issue