summaryrefslogtreecommitdiff
path: root/includes/model/Room_model.php
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2017-07-23 11:46:54 +0200
committermsquare <msquare@notrademark.de>2017-07-23 11:46:54 +0200
commita157004f4aefaa5e2265f852f9432becedee1d66 (patch)
treec47915a311371afa7aa962655fd5ff1ff2ab5e64 /includes/model/Room_model.php
parent36446dd644ff865d1d63aab0ba4c670ce2b277d1 (diff)
handle failed db queries in Db class
Diffstat (limited to 'includes/model/Room_model.php')
-rw-r--r--includes/model/Room_model.php5
1 files changed, 1 insertions, 4 deletions
diff --git a/includes/model/Room_model.php b/includes/model/Room_model.php
index 17617b39..fdd9dddc 100644
--- a/includes/model/Room_model.php
+++ b/includes/model/Room_model.php
@@ -35,7 +35,7 @@ function Room_delete($room_id)
*/
function Room_create($name, $from_frab, $public, $number = null)
{
- $result = DB::insert('
+ DB::insert('
INSERT INTO `Room` (`Name`, `FromPentabarf`, `show`, `Number`)
VALUES (?, ?, ?, ?)
',
@@ -46,9 +46,6 @@ function Room_create($name, $from_frab, $public, $number = null)
(int)$number,
]
);
- if (!$result) {
- return false;
- }
return DB::getPdo()->lastInsertId();
}