diff options
author | Philip Häusler <msquare@notrademark.de> | 2014-12-07 17:48:35 +0100 |
---|---|---|
committer | Philip Häusler <msquare@notrademark.de> | 2014-12-07 17:48:35 +0100 |
commit | b75700ee1bf4bc07f1da7899aac864cb561022f4 (patch) | |
tree | 81324e1dbb63233f1895cdb5b14a998069bc5a9b /includes/model | |
parent | d26f8aa12cd71cd5301e6747fbedf6bfbe2ac37f (diff) |
add shift delete model
Diffstat (limited to 'includes/model')
-rw-r--r-- | includes/model/Shifts_model.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/includes/model/Shifts_model.php b/includes/model/Shifts_model.php index a1d7967f..28f84c26 100644 --- a/includes/model/Shifts_model.php +++ b/includes/model/Shifts_model.php @@ -1,6 +1,20 @@ <?php /** + * Delete a shift by its external id. + */ +function Shift_delete_by_psid($shift_psid) { + return sql_query("DELETE FROM `Shifts` WHERE `PSID`=" . sql_escape($shift_psid)); +} + +/** + * Delete a shift. + */ +function Shift_delete($shift_id) { + return sql_query("DELETE FROM `Shifts` WHERE `SID`=" . sql_escape($shift_id)); +} + +/** * Update a shift. */ function Shift_update($shift) { |