note 18786 deleted from function.odbc-fetch-array by philip

From: Date: Sun, 21 Dec 2008 15:11:53 +0000
Subject: note 18786 deleted from function.odbc-fetch-array by philip
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-148412@lists.php.net to get a copy of this message
Note Submitter: martin at NOSPAMkouba dot at ---- 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; }

« previous php.notes (#148412) next »