From a157004f4aefaa5e2265f852f9432becedee1d66 Mon Sep 17 00:00:00 2001 From: msquare Date: Sun, 23 Jul 2017 11:46:54 +0200 Subject: handle failed db queries in Db class --- includes/model/NeededAngelTypes_model.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'includes/model/NeededAngelTypes_model.php') diff --git a/includes/model/NeededAngelTypes_model.php b/includes/model/NeededAngelTypes_model.php index 97b085f0..e77c715f 100644 --- a/includes/model/NeededAngelTypes_model.php +++ b/includes/model/NeededAngelTypes_model.php @@ -17,7 +17,7 @@ use Engelsystem\Database\DB; */ function NeededAngelType_add($shift_id, $angeltype_id, $room_id, $count) { - $result = DB::insert(' + DB::insert(' INSERT INTO `NeededAngelTypes` ( `shift_id`, `angel_type_id`, `room_id`, `count`) VALUES (?, ?, ?, ?) ', @@ -27,9 +27,6 @@ function NeededAngelType_add($shift_id, $angeltype_id, $room_id, $count) $room_id, $count, ]); - if ($result === false) { - return false; - } return DB::getPdo()->lastInsertId(); } -- cgit v1.2.3-70-g09d2