aboutsummaryrefslogtreecommitdiffstats
path: root/include/dba.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-04-29 19:41:17 -0700
committerfriendica <info@friendica.com>2012-04-29 19:41:17 -0700
commit1ebde084154f6272664e0b8c7309aab5b9c91cf2 (patch)
tree893abe2bfaff374c8ce003e8914da7109873f76c /include/dba.php
parent0153d86b7f4e2913b1eb985a905f7eb94822b589 (diff)
downloadvolse-hubzilla-1ebde084154f6272664e0b8c7309aab5b9c91cf2.tar.gz
volse-hubzilla-1ebde084154f6272664e0b8c7309aab5b9c91cf2.tar.bz2
volse-hubzilla-1ebde084154f6272664e0b8c7309aab5b9c91cf2.zip
log db error strings in all cases
Diffstat (limited to 'include/dba.php')
-rw-r--r--include/dba.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/dba.php b/include/dba.php
index 414f4ae7a..c9f880241 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);
}