Re: function odbc_fetch_object()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
20030430171608.63898.qmail@pb1.pair.com">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
>
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux