summaryrefslogtreecommitdiff
path: root/src/Database
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 /src/Database
parent36446dd644ff865d1d63aab0ba4c670ce2b277d1 (diff)
handle failed db queries in Db class
Diffstat (limited to 'src/Database')
-rw-r--r--src/Database/Db.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Database/Db.php b/src/Database/Db.php
index 4116ffda..46edc96b 100644
--- a/src/Database/Db.php
+++ b/src/Database/Db.php
@@ -85,13 +85,13 @@ class Db
*
* @param string $query
* @param array $bindings
- * @return int|bool
+ * @return int Row count
*/
public static function insert($query, array $bindings = [])
{
self::query($query, $bindings);
- return (self::$lastStatus ? self::$stm->rowCount() : false);
+ return self::$stm->rowCount();
}
/**
@@ -99,13 +99,13 @@ class Db
*
* @param string $query
* @param array $bindings
- * @return int|bool
+ * @return int
*/
public static function update($query, array $bindings = [])
{
self::query($query, $bindings);
- return (self::$lastStatus ? self::$stm->rowCount() : false);
+ return self::$stm->rowCount();
}
/**