]> git.mxchange.org Git - friendica.git/commitdiff
Emulation for the mysqli behaviour when executing insert, update, ...
authorMichael <heluecht@pirati.ca>
Sun, 5 Mar 2017 23:59:53 +0000 (23:59 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 5 Mar 2017 23:59:53 +0000 (23:59 +0000)
include/dba.php

index 09d705cbdb9bdb285986ffc73eb69c4b5eaf861c..000b5b49ec13f759dd3b663e24ad5bbc6c1dbf48 100644 (file)
@@ -334,6 +334,9 @@ class dba {
                        if (file_exists('dbfail.out')) {
                                file_put_contents('dbfail.out', datetime_convert() . "\n" . printable($sql) . ' returned false' . "\n" . $this->error . "\n", FILE_APPEND);
                        }
+               } elseif (($this->driver == 'pdo') AND (strtolower(substr($orig_sql, 0, 6)) != "select")) {
+                       // mysqli separates the return value between "select" and "update" - pdo doesn't
+                       $result = true;
                }
 
                if (($result === true) || ($result === false)) {