-
- if ($globals->debug & 1) {
- list($ue, $se) = explode(" ", microtime());
- list($us, $ss) = explode(" ", $time_start);
- $time = intval((($ue - $us) + ($se - $ss)) * 1000);
- $trace_data['error'] = XDB::$mysqli->error;
- $trace_data['exectime'] = $time;
- $trace_data['rows'] = @$res->num_rows ? $res->num_rows : XDB::$mysqli->affected_rows;
- $GLOBALS['XDB::trace_data'][] = $trace_data;
- if (XDB::$mysqli->errno) {
- $GLOBALS['XDB::error'] = true;
- }
+
+ if ($globals->debug & DEBUG_BT) {
+ PlBacktrace::$bt['MySQL']->stop(@$res->num_rows ? $res->num_rows : XDB::$mysqli->affected_rows,
+ XDB::$mysqli->error,
+ $explain);