]> granicus.if.org Git - php/commitdiff
use feautres property instead of options
authorTomas V.V.Cox <cox@php.net>
Fri, 2 Nov 2001 00:38:23 +0000 (00:38 +0000)
committerTomas V.V.Cox <cox@php.net>
Fri, 2 Nov 2001 00:38:23 +0000 (00:38 +0000)
pear/DB.php

index feea467ff34e3fcff6d7ed8909f16a7b88fb6470..5f0a536688e9d0a720940248529259d521ff46cd 100644 (file)
@@ -634,9 +634,9 @@ class DB_result
             if ($this->row_counter === null) {
                 $this->row_counter = $this->dbh->limit_from;
                 // For Interbase
-                if ($this->dbh->options['limit'] == false) {
+                if ($this->dbh->features['limit'] == false) {
                     $i = 0;
-                    while ($i++ <= $this->dbh->limit_from) {
+                    while ($i++ < $this->dbh->limit_from) {
                         $this->dbh->fetchInto($this->result, $arr, $fetchmode);
                     }
                 }
@@ -646,9 +646,10 @@ class DB_result
             {
                 return null;
             }
-            if ($this->dbh->options['limit'] == 'emulate') {
+            if ($this->dbh->features['limit'] == 'emulate') {
                 $rownum = $this->row_counter;
             }
+
             $this->row_counter++;
         }
         $res = $this->dbh->fetchInto($this->result, $arr, $fetchmode, $rownum);
@@ -686,9 +687,9 @@ class DB_result
             if ($this->row_counter === null) {
                 $this->row_counter = $this->dbh->limit_from;
                 // For Interbase
-                if ($this->dbh->options['limit'] == false) {
+                if ($this->dbh->features['limit'] == false) {
                     $i = 0;
-                    while ($i++ <= $this->dbh->limit_from) {
+                    while ($i++ < $this->dbh->limit_from) {
                         $this->dbh->fetchInto($this->result, $arr, $fetchmode);
                     }
                 }
@@ -698,9 +699,10 @@ class DB_result
             {
                 return null;
             }
-            if ($this->dbh->options['limit'] == 'emulate') {
+            if ($this->dbh->features['limit'] == 'emulate') {
                 $rownum = $this->row_counter;
             }
+
             $this->row_counter++;
         }
         $res = $this->dbh->fetchInto($this->result, $arr, $fetchmode, $rownum);