]> granicus.if.org Git - php/commitdiff
pgsql.php
authorTomas V.V.Cox <cox@php.net>
Wed, 28 Mar 2001 23:52:21 +0000 (23:52 +0000)
committerTomas V.V.Cox <cox@php.net>
Wed, 28 Mar 2001 23:52:21 +0000 (23:52 +0000)
* 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()

pear/DB.php

index 9f2037efd056f604ba8ba1b4681170f3f1413c7e..3384ec1c6260ec549c318716bfa85895a24b2687 100644 (file)
@@ -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);
     }
 
     /**