Making same change as [3235]

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3236 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
nate 2006-07-12 04:37:49 +00:00
parent 0a5b1b6450
commit bc745b234a

View file

@ -266,6 +266,21 @@ class DboSource extends DataSource {
return $this->_result;
}
}
/**
* Returns a row from given resultset as an array .
*
* @param bool $assoc Associative array only, or both?
* @return array The fetched row as an array
*/
function fetchRow($assoc = false) {
if (is_resource($this->_result)) {
$this->resultSet($this->_result);
$resultRow = $this->fetchResult();
return $resultRow;
} else {
return null;
}
}
/**
* Returns a single row of results from the _last_ SQL query.
*