From: friendica Date: Mon, 30 Apr 2012 02:41:17 +0000 (-0700) Subject: log db error strings in all cases X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=1ebde084154f6272664e0b8c7309aab5b9c91cf2;p=friendica.git log db error strings in all cases --- diff --git a/include/dba.php b/include/dba.php index 414f4ae7a7..c9f880241b 100644 --- a/include/dba.php +++ b/include/dba.php @@ -74,9 +74,9 @@ class dba { if((! $this->db) || (! $this->connected)) return false; - - $this->error = ''; + $this->error = ''; + if($this->mysqli) $result = @$this->db->query($sql); else @@ -122,7 +122,7 @@ class dba { */ if($result === false) { - logger('dba: ' . printable($sql) . ' returned false.'); + logger('dba: ' . printable($sql) . ' returned false.' . "\n" . $this->error); if(file_exists('dbfail.out')) file_put_contents('dbfail.out', datetime_convert() . "\n" . printable($sql) . ' returned false' . "\n" . $this->error . "\n", FILE_APPEND); }