note 50333 added to function.odbc-fetch-array

From: Date: Thu, 24 Feb 2005 23:59:29 +0000
Subject: note 50333 added to function.odbc-fetch-array
Groups: php.notes 
Request: Send a blank email to php-notes+get-85516@lists.php.net to get a copy of this message
This function is undefined in 4.1.2 (RedHat 7.3) despite the claims of the documentation. It's just too useful a function not to have, particularly if your database is prone to change. Here's my quick and dirty version: function odbc_fetch_array($resource, &$array) { $array=array(); // Truncate the array first... if (! $int = odbc_fetch_into ($resource, $result_array)) return false; for ($i=1; $i <= $int; $i++) { $array[odbc_field_name($resource, $i)] = $result_array[$i - 1]; } return true; } ---- Manual Page -- http://www.php.net/manual/en/function.odbc-fetch-array.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+50333 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+50333&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+50333&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+50333&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+50333&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+50333&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+50333&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#85516) next »