mapping lastNumRows to lastAffectedRows as it is not possible to do the first one using PDO

This commit is contained in:
José Lorenzo Rodríguez 2010-11-16 02:02:08 -04:30
parent 5a881c461e
commit a335891eba

View file

@ -299,8 +299,7 @@ class DboSource extends DataSource {
if ($options['log']) {
$this->took = round((microtime(true) - $t) * 1000, 0);
$this->affected = $this->lastAffected();
//$this->numRows = $this->lastNumRows();
$this->numRows = $this->affected = $this->lastAffected();
$this->logQuery($sql);
}
@ -376,14 +375,7 @@ class DboSource extends DataSource {
* @return integer Number of rows in resultset
*/
function lastNumRows($source = null) {
if ($this->hasResult()) {
$i = 0;
foreach ($this->_result as $row) {
$i++;
}
return $i;
}
return null;
return $this->lastAffected($source);
}
/**