Changeset View
Changeset View
Standalone View
Standalone View
branches/5.2.x/core/kernel/db/db_connection.php
Show First 20 Lines • Show All 1076 Lines • ▼ Show 20 Line(s) | |||||
$this->queryID = $this->connectionID->query($sql); | $this->queryID = $this->connectionID->query($sql); | ||||
if ( is_object($this->queryID) ) { | if ( is_object($this->queryID) ) { | ||||
$ret = new $iterator_class($this->queryID, $key_field); | $ret = new $iterator_class($this->queryID, $key_field); | ||||
/* @var $ret kMySQLQuery */ | /* @var $ret kMySQLQuery */ | ||||
// set 2nd checkpoint: begin | // set 2nd checkpoint: begin | ||||
if ( $this->_profileSQLs ) { | if ( $this->_profileSQLs ) { | ||||
$first_cell = count($ret) == 1 && $ret->fieldCount() == 1 ? current($ret->current()) : null; | $current_row = $ret->current(); | ||||
if ( count($ret) == 1 && $ret->fieldCount() == 1 ) { | |||||
if ( is_array($current_row) ) { | |||||
$first_cell = current($current_row); | |||||
} | |||||
else { | |||||
$first_cell = $current_row; | |||||
} | |||||
} | |||||
else { | |||||
$first_cell = null; | |||||
} | |||||
if ( strlen($first_cell) > 200 ) { | if ( strlen($first_cell) > 200 ) { | ||||
$first_cell = substr($first_cell, 0, 50) . ' ...'; | $first_cell = substr($first_cell, 0, 50) . ' ...'; | ||||
} | } | ||||
$debugger->profileFinish('sql_' . $queryID, null, null, $this->getAffectedRows(), $first_cell, $this->_queryCount, $this->nextQueryCachable, $this->serverInfoLine); | $debugger->profileFinish('sql_' . $queryID, null, null, $this->getAffectedRows(), $first_cell, $this->_queryCount, $this->nextQueryCachable, $this->serverInfoLine); | ||||
$debugger->profilerAddTotal('sql', 'sql_' . $queryID); | $debugger->profilerAddTotal('sql', 'sql_' . $queryID); | ||||
$this->nextQueryCachable = false; | $this->nextQueryCachable = false; | ||||
▲ Show 20 Lines • Show All 303 Lines • Show Last 20 Lines |