note 18786 added to function.odbc-fetch-array
| From: | martin at NOSPAMkouba dot at | Date: | Tue, 05 Feb 2002 20:46:41 +0000 |
| Subject: | note 18786 added to function.odbc-fetch-array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-26268@lists.php.net to get a copy of this message | ||
since this is not available at 4.1 at the moment you can try this (put it in an extra file and
include it to avoid an error when the function will exist on the next php update):
if (function_exists(odbc_fetch_array))
return;
function odbc_fetch_array($result, $rownumber=-1) {
if (PHP_VERSION > "4.1") {
if ($rownumber < 0) {
odbc_fetch_into($result, &$rs);
} else {
odbc_fetch_into($result, &$rs, $rownumber);
}
} else {
odbc_fetch_into($result, $rownumber, &$rs);
}
foreach ($rs as $key => $value) {
$rs_assoc[odbc_field_name($result, $key+1)] = $value;
}
return $rs_assoc;
}
--
http://www.php.net/manual/en/function.odbc-fetch-array.php
http://master.php.net/manage/user-notes.php?action=edit+18786
http://master.php.net/manage/user-notes.php?action=delete+18786
http://master.php.net/manage/user-notes.php?action=reject+18786