mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
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:
parent
0a5b1b6450
commit
bc745b234a
1 changed files with 15 additions and 0 deletions
|
@ -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.
|
||||
*
|
||||
|
|
Loading…
Add table
Reference in a new issue