summaryrefslogtreecommitdiff
path: root/includes/model
diff options
context:
space:
mode:
Diffstat (limited to 'includes/model')
-rw-r--r--includes/model/NeededAngelTypes_model.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/includes/model/NeededAngelTypes_model.php b/includes/model/NeededAngelTypes_model.php
index 81ce2d5f..e9176d34 100644
--- a/includes/model/NeededAngelTypes_model.php
+++ b/includes/model/NeededAngelTypes_model.php
@@ -23,7 +23,8 @@ function NeededAngelTypes_by_shift($shiftId) {
SELECT `NeededAngelTypes`.*, `AngelTypes`.`name`, `AngelTypes`.`restricted`
FROM `NeededAngelTypes`
JOIN `AngelTypes` ON `AngelTypes`.`id` = `NeededAngelTypes`.`angel_type_id`
- WHERE `room_id`=" . sql_escape($shiftId) . "
+ JOIN `Shifts` ON `Shifts`.`RID` = `NeededAngelTypes`.`room_id`
+ WHERE `Shifts`.`SID`=" . sql_escape($shiftId) . "
AND `count` > 0
ORDER BY `room_id` DESC
");