allow dbg(2) to only return the canonical SQL used in the query and the number of results, but not log every single result. Maybe we should use 1 for this and 2 for the full results, but I didn't really want to change the way people do things today. If anybody has a strong opinion about doing this, go ahead and change it and send a note to the developer forum.

This commit is contained in:
zotlabs 2018-04-14 16:47:51 -07:00
parent f16dc7afc8
commit fdf5799857

View File

@ -100,7 +100,9 @@ class dba_pdo extends dba_driver {
if($this->debug) {
db_logger('dba_pdo: DEBUG: ' . printable($sql) . ' returned ' . count($r) . ' results.', LOGGER_NORMAL, LOG_INFO);
db_logger('dba_pdo: ' . printable(print_r($r,true)), LOGGER_NORMAL, LOG_INFO);
if(intval($this->debug) === 1) {
db_logger('dba_pdo: ' . printable(print_r($r,true)), LOGGER_NORMAL, LOG_INFO);
}
}
return (($this->error) ? false : $r);