Re: mysql_fetch_array...

From: Date: Thu, 31 Aug 2000 19:21:34 +0000
Subject: Re: mysql_fetch_array...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-14668@lists.php.net to get a copy of this message
On Thu, 31 Aug 2000, D. Meehan wrote: > Has anyone written a odbc_fetch_array function that works the same way mysql_fetch_array does? > That sounds like fun :) function odbc_fetch_array($result, $row) { global $db_conn; if (odbc_fetch_row($result, $row)) { $columns = odbc_fetch_into($result); for ($i = 1; $i < $columns; $i++) { $name = odbc_field_name($result, $i); $value = odbc_result($result, $name); $array[$name] = $value; } return $array; } else return false; } I didn't really test this, but I guess it would work. Regards, Joao -- Joao Prado Maia Web Developer Kefta.com, Inc

« previous php.general (#14668) next »