]> granicus.if.org Git - php/commitdiff
change DB_result::fetchRow to use extension fetchInto instead of
authorTomas V.V.Cox <cox@php.net>
Thu, 7 Jun 2001 12:55:14 +0000 (12:55 +0000)
committerTomas V.V.Cox <cox@php.net>
Thu, 7 Jun 2001 12:55:14 +0000 (12:55 +0000)
DB_result::fetchInto (speed improvement)

pear/DB.php

index 1c7a6f1d763aa32dde84337015f42eba6c0bb8e6..ff6166b65217c24d85cf8c7a15226bffd9ba0b10 100644 (file)
@@ -600,7 +600,11 @@ class DB_result
      */
     function fetchRow($fetchmode = DB_FETCHMODE_DEFAULT, $rownum=null)
     {
-        $res = $this->fetchInto($arr, $fetchmode, $rownum);
+        if ($fetchmode === DB_FETCHMODE_DEFAULT) {
+            $fetchmode = $this->dbh->fetchmode;
+        }
+
+        $res = $this->dbh->fetchInto($arr, $fetchmode, $rownum);
         if ($res !== DB_OK) {
             return $res;
         }