note 24291 deleted from ref.odbc by sniper
| From: | sniper@php.net | Date: | Tue, 04 Nov 2003 00:38:05 +0000 |
| Subject: | note 24291 deleted from ref.odbc by sniper | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-59762@lists.php.net to get a copy of this message | ||
Note Submitter: steven@webdesignsolutions.net
----
another fetch array acts the same as mysql_fetch_array, but make a numeric array
ODBCDATA[0];
ODBCDATA[1];
ODBCDATA[2];
and an associative array
ODBCDATA["field1"];
ODBCDATA["field2"];
ODBCDATA["field3"];
I am sure people could inprive on this:
function odbc_fetch_array($R)
{
$FR = odbc_fetch_row($R);
for ($i = 1;$i <= odbc_num_fields($R);$i++)
{
$FN = odbc_field_name($R,$i);
$FV = odbc_result($R,$i);
$RA[$FN] = $FV;
$RA[$i-1] = $FV;
}
if ($FR == false)return false;
return $RA;
}