From afb77d22ba35dfbee74bbbee95626d55edef8898 Mon Sep 17 00:00:00 2001 From: msquare Date: Sun, 10 Dec 2017 18:56:40 +0100 Subject: move room db queries to model --- includes/model/Shifts_model.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'includes/model/Shifts_model.php') diff --git a/includes/model/Shifts_model.php b/includes/model/Shifts_model.php index 8a1b69f9..1fc7fe89 100644 --- a/includes/model/Shifts_model.php +++ b/includes/model/Shifts_model.php @@ -26,6 +26,12 @@ function Shifts_by_angeltype($angeltype) { ', [$angeltype['id'], $angeltype['id']]); } +/** + * Returns all shifts with a PSID (from frab import) + */ +function Shifts_from_frab() { + return DB::select('SELECT * FROM `Shifts` WHERE `PSID` IS NOT NULL ORDER BY `start`'); +} /** * @param array $room -- cgit v1.2.3-54-g00ecf