Re: function odbc_fetch_object()
| From: | Juerg Zgraggen | Date: | Wed, 30 Apr 2003 18:56:50 +0000 |
| Subject: | Re: function odbc_fetch_object() | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-27452@lists.php.net to get a copy of this message | ||
found the solution... (http://bugs.php.net/bug.php?id=21247)
if you don't like to recompile php, you can use the workaround i found on
www.php.net...
--------------------------------------------
function __odbc_fetch_object($res)
{
if( function_exists("odbc_fetch_object") )
return odbc_fetch_object($res);
$rs = array();
$rs_obj = false;
if( odbc_fetch_into($res, &$rs) )
{
foreach( $rs as $key=>$value )
{
$fkey = odbc_field_name($res, $key+1);
$rs_obj->$fkey = trim($value);
}
}
return $rs_obj;
}
--------------------------------------------
cheers
juerg zgraggen
"Juerg Zgraggen" <j.a.z@bluewin.ch> schrieb im Newsbeitrag
news:20030430171608.63898.qmail@pb1.pair.com...
> hi
>
> i've installed apache2 and php 4.3.1
> when i'd like to use the function odbc_fetch_object(), php tells me
>
> Fatal error: Call to undefined function: odbc_fetch_object()...
>
> i'm a bit confused because other ODBC-functions like odbc_connect() work
> great and www.php.net tells me that odbc_fetch_object() works since php
> version 4.0.2
>
> as far as i know, php included all ODBC-function in the latest version...
so
> i don't need to have the odbc.dll and don't have to activate it in php.ini
> ??? right?
>
> so what can i do to get this function working???
>
> thanx for every answer.
> regards, juerg zgraggen
>
>