diff options
author | msquare <msquare@notrademark.de> | 2017-07-23 11:46:54 +0200 |
---|---|---|
committer | msquare <msquare@notrademark.de> | 2017-07-23 11:46:54 +0200 |
commit | a157004f4aefaa5e2265f852f9432becedee1d66 (patch) | |
tree | c47915a311371afa7aa962655fd5ff1ff2ab5e64 /includes/model/ShiftTypes_model.php | |
parent | 36446dd644ff865d1d63aab0ba4c670ce2b277d1 (diff) |
handle failed db queries in Db class
Diffstat (limited to 'includes/model/ShiftTypes_model.php')
-rw-r--r-- | includes/model/ShiftTypes_model.php | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/includes/model/ShiftTypes_model.php b/includes/model/ShiftTypes_model.php index 96a823d4..12fe38be 100644 --- a/includes/model/ShiftTypes_model.php +++ b/includes/model/ShiftTypes_model.php @@ -20,7 +20,6 @@ function ShiftType_delete($shifttype_id) * @param string $name * @param int $angeltype_id * @param string $description - * @return bool */ function ShiftType_update($shifttype_id, $name, $angeltype_id, $description) { @@ -38,8 +37,6 @@ function ShiftType_update($shifttype_id, $name, $angeltype_id, $description) $shifttype_id, ] ); - - return DB::getStm()->errorCode() == '00000'; } /** @@ -52,7 +49,7 @@ function ShiftType_update($shifttype_id, $name, $angeltype_id, $description) */ function ShiftType_create($name, $angeltype_id, $description) { - $result = DB::insert(' + DB::insert(' INSERT INTO `ShiftTypes` (`name`, `angeltype_id`, `description`) VALUES(?, ?, ?) ', @@ -63,10 +60,6 @@ function ShiftType_create($name, $angeltype_id, $description) ] ); - if ($result === false) { - return false; - } - return DB::getPdo()->lastInsertId(); } |