PEAR ibase.php changes

Alexander Knauer dbadmin@avenet.stw.uni-erlangen.de
Tue, 28 Aug 2001 16:03:43 +0200


Hi,

can someone commit the following changes to PEARs "ibase.php":

currently the function fetchInto looks like this:

############################

function fetchInto($result, &$ar, $fetchmode=DB_FETCHMODE_DEFAULT,
$rownum=null)
    {
        ......      

        if ($fetchmode & DB_FETCHMODE_ASSOC) {
            return $this->raiseError(DB_ERROR_NOT_CAPABLE);
        } else {
            $ar = ibase_fetch_row($result);
        }
        
        ......

        return DB_OK;
    }

###########################

but the error "DB_ERROR_NOT_CAPABLE" is not correct, with Interbase the
row can be fetched as an array with the following code:

        if ($fetchmode & DB_FETCHMODE_ASSOC) {
            $ar = (array)ibase_fetch_object($result);
        } else {
            $ar = ibase_fetch_row($result);
        }


With these changes the Horde/IMP preferences can be restored from an
interbase database without problems and further modifications (saving
preferences did already work).

Thanks.

Alexander Knauer



-------------------------
  Alexander Knauer
 -= Ave!NET-Team =-
Database administration &
developing

 Tel: +49 (0)911 / 3651815
 Fax: +49 (0)911 / 3609882
-------------------------