From: Tomas V.V.Cox Date: Wed, 28 Mar 2001 23:52:21 +0000 (+0000) Subject: pgsql.php X-Git-Tag: php-4.0.6RC1~541 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1910b18164f6e60d74aa23a81b5d8e2d4a98c859;p=php pgsql.php * better handling of $rownum param in fetchInto() * changed property numrows[] to num_rows[] DB.php * $rowmun in fetch* now defaults to NULL mysql.php * added default $fetchmode to ordered * removed extra checks in connect() * fetchrow() now uses fetchInto() * added the "fetch absolute row numbers" feature to fetchInto() (not tested) ifx.php * better handling of $rownum param in fetchInto() --- diff --git a/pear/DB.php b/pear/DB.php index 9f2037efd0..3384ec1c62 100644 --- a/pear/DB.php +++ b/pear/DB.php @@ -585,7 +585,7 @@ class DB_result * * @return array a row of data, or false on error */ - function fetchRow($fetchmode = DB_FETCHMODE_DEFAULT, $rownum=0) + function fetchRow($fetchmode = DB_FETCHMODE_DEFAULT, $rownum=null) { $res = $this->fetchInto ($arr, $fetchmode, $rownum); if ($res !== DB_OK) { @@ -603,12 +603,12 @@ class DB_result * * @return int error code */ - function fetchInto(&$arr, $fetchmode = DB_FETCHMODE_DEFAULT, $rownum=0) + function fetchInto(&$arr, $fetchmode = DB_FETCHMODE_DEFAULT, $rownum=null) { if ($fetchmode == DB_FETCHMODE_DEFAULT) { $fetchmode = $this->dbh->fetchmode; } - return $this->dbh->fetchInto($this->result, $arr, $fetchmode, $rownum=0); + return $this->dbh->fetchInto($this->result, $arr, $fetchmode, $rownum); } /**