aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-06-22 19:08:59 -0700
committerredmatrix <git@macgirvin.com>2016-06-22 19:08:59 -0700
commit1267d995ef031f6ecf4d1f1951a700dfdcbf6c8d (patch)
tree4a17682af3080965581acf46b32becbab29ea2ce /include
parentec8091a102b9cb2f8f47ef87982533bcd5ba9886 (diff)
downloadvolse-hubzilla-1267d995ef031f6ecf4d1f1951a700dfdcbf6c8d.tar.gz
volse-hubzilla-1267d995ef031f6ecf4d1f1951a700dfdcbf6c8d.tar.bz2
volse-hubzilla-1267d995ef031f6ecf4d1f1951a700dfdcbf6c8d.zip
db statement debugging
Diffstat (limited to 'include')
-rwxr-xr-xinclude/dba/dba_driver.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/dba/dba_driver.php b/include/dba/dba_driver.php
index df072ed76..f6091f6e1 100755
--- a/include/dba/dba_driver.php
+++ b/include/dba/dba_driver.php
@@ -90,7 +90,7 @@ abstract class dba_driver {
protected $db;
protected $pdo = array();
- public $debug = 0;
+ public $debug = 0;
public $connected = false;
public $error = false;
@@ -332,6 +332,9 @@ function q($sql) {
else
db_logger('dba: vsprintf error: ' . print_r(debug_backtrace(), true),LOGGER_NORMAL,LOG_CRIT);
}
+ if(\DBA::$dba->debug)
+ db_logger('Sql: ' . $stmt, LOGGER_DEBUG, LOG_INFO);
+
return \DBA::$dba->q($stmt);
}