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,19 +425,25 @@ class DboAdodb extends DboSource {
* @return unknown
*/
function fetchResult() {
if (!empty($this->results) && $row = $this->results) {
$resultRow = array();
$fields = array_keys($row);
$count = count($fields);
$i = 0;
for ($i = 0; $i < $count; $i++) { //$row as $index => $field) {
list($table, $column) = $this->map[$i];
$resultRow[$table][$column] = $row[$fields[$i]];
}
return $resultRow;
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);
$i = 0;
for ($i = 0; $i < $count; $i++) { //$row as $index => $field) {
list($table, $column) = $this->map[$i];
$resultRow[$table][$column] = $row[$fields[$i]];
}
return $resultRow;
}
/**