cvs: php4 /pear/DB ibase.php

From: Date: Tue, 28 Aug 2001 18:12:47 +0000
Subject: cvs: php4 /pear/DB ibase.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-686@lists.php.net to get a copy of this message
chagenbu Tue Aug 28 14:12:47 2001 EDT Modified files: /php4/pear/DB ibase.php Log: a simple cast means we can use ibase_fetch_object to implement DB_FETCHMODE_ASSOC. Index: php4/pear/DB/ibase.php diff -u php4/pear/DB/ibase.php:1.20 php4/pear/DB/ibase.php:1.21 --- php4/pear/DB/ibase.php:1.20 Mon Jul 30 16:43:12 2001 +++ php4/pear/DB/ibase.php Tue Aug 28 14:12:46 2001 @@ -16,7 +16,7 @@ // | Authors: Sterling Hughes <sterling@php.net> | // +----------------------------------------------------------------------+ // -// $Id: ibase.php,v 1.20 2001/07/30 20:43:12 ssb Exp $ +// $Id: ibase.php,v 1.21 2001/08/28 18:12:46 chagenbu Exp $ // // Database independent query interface definition for PHP's Interbase // extension. @@ -92,7 +92,7 @@ return DB::isManip($query) ? DB_OK : $result; } - function &fetchRow($result, $fetchmode=DB_FETCHMODE_DEFAULT) + function &fetchRow($result, $fetchmode = DB_FETCHMODE_DEFAULT) { if ($fetchmode == DB_FETCHMODE_DEFAULT) { $fetchmode = $this->fetchmode; @@ -112,7 +112,7 @@ return $row; } - function fetchInto($result, &$ar, $fetchmode=DB_FETCHMODE_DEFAULT, $rownum=null) + function fetchInto($result, &$ar, $fetchmode = DB_FETCHMODE_DEFAULT, $rownum = null) { if ($rownum !== NULL) { return $this->raiseError(DB_ERROR_NOT_CAPABLE); @@ -121,7 +121,7 @@ $fetchmode = $this->fetchmode; } if ($fetchmode & DB_FETCHMODE_ASSOC) { - return $this->raiseError(DB_ERROR_NOT_CAPABLE); + $ar = (array)ibase_fetch_object($result); } else { $ar = ibase_fetch_row($result); }

« previous php.pear.cvs (#686) next »