fixes #5227, adodb fetch row

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7451 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
gwoo 2008-08-11 14:42:37 +00:00
parent fb3eb24a0d
commit 1ba01ef786

View file

@ -425,7 +425,16 @@ class DboAdodb extends DboSource {
* @return unknown
*/
function fetchResult() {
if (!empty($this->results) && $row = $this->results) {
if (!empty($this->results)) {
$row = $this->results;
} else {
$row = $this->_result->FetchRow();
}
if (empty($row)) {
return false;
}
$resultRow = array();
$fields = array_keys($row);
$count = count($fields);
@ -435,9 +444,6 @@ class DboAdodb extends DboSource {
$resultRow[$table][$column] = $row[$fields[$i]];
}
return $resultRow;
} else {
return false;
}
}
/**