summaryrefslogtreecommitdiff
path: root/includes/model
diff options
context:
space:
mode:
authorPhilip Häusler <msquare@notrademark.de>2014-12-19 22:41:55 +0100
committerPhilip Häusler <msquare@notrademark.de>2014-12-19 22:41:55 +0100
commitd02272afd6725d46c37b7ba781c5d40268aa09a6 (patch)
treec7bd969a455aed4e57524df6cfaf13a766fb01c9 /includes/model
parenta791a75b0a893308f35865542149c77f8761b3a0 (diff)
add basic shift view
Diffstat (limited to 'includes/model')
-rw-r--r--includes/model/Shifts_model.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/includes/model/Shifts_model.php b/includes/model/Shifts_model.php
index 1f22ebdb..eca0d141 100644
--- a/includes/model/Shifts_model.php
+++ b/includes/model/Shifts_model.php
@@ -71,7 +71,7 @@ function Shift_create($shift) {
*/
function Shifts_by_user($user) {
return sql_select("
- SELECT *
+ SELECT `ShiftTypes`.`id` as `shifttype_id`, `ShiftTypes`.`name`, `ShiftEntry`.*, `Shifts`.*, `Room`.*
FROM `ShiftEntry`
JOIN `Shifts` ON (`ShiftEntry`.`SID` = `Shifts`.`SID`)
JOIN `ShiftTypes` ON (`ShiftTypes`.`id` = `Shifts`.`shifttype_id`)
@@ -138,7 +138,7 @@ function Shift($id) {
FROM `Shifts`
JOIN `ShiftTypes` ON (`ShiftTypes`.`id` = `Shifts`.`shifttype_id`)
WHERE `SID`=" . sql_escape($id));
- $shiftsEntry_source = sql_select("SELECT `TID` , `UID` , `freeloaded` FROM `ShiftEntry` WHERE `SID`=" . sql_escape($id));
+ $shiftsEntry_source = sql_select("SELECT `id`, `TID` , `UID` , `freeloaded` FROM `ShiftEntry` WHERE `SID`=" . sql_escape($id));
if ($shifts_source === false)
return false;