Permalink
Browse files

fixed check of limits

git-svn-id: http://svn.php.net/repository/pear/packages/MDB/trunk@180620 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
1 parent d97de72 commit 39faf679e3259374557d89cf7b7bd94a13b59b8c @quipo quipo committed Feb 23, 2005
Showing with 4 additions and 4 deletions.
  1. +4 −4 MDB/ibase.php
View
@@ -783,16 +783,16 @@ function fetchInto($result, $fetchmode=MDB_FETCHMODE_DEFAULT, $rownum=null)
) {
if (isset($this->limits[$result_value])) {
//upper limit
- if ($rownum > $this->limits[$result_value][1]) {
+ if ($rownum >= $this->limits[$result_value][1]) {
// are all previous rows fetched so that we can set the end
// of the result set and not have any "holes" in between?
if ($rownum == 0
|| (isset($this->results[$result_value])
&& count($this->results[$result_value]) == $rownum)
) {
$this->highest_fetched_row[$result_value] = $rownum;
- $this->current_row[$result_value] = $rownum;
- $this->results[$result_value][$rownum] = false;
+ $this->current_row[$result_value] = $rownum;
+ $this->results[$result_value][$rownum] = false;
}
if ($this->options['autofree']) {
$this->freeResult($result);
@@ -802,7 +802,7 @@ function fetchInto($result, $fetchmode=MDB_FETCHMODE_DEFAULT, $rownum=null)
// offset skipping
if (MDB::isError($this->_skipLimitOffset($result))) {
$this->current_row[$result_value] = 0;
- $this->results[$result_value] = array(false);
+ $this->results[$result_value] = array(false);
if ($this->options['autofree']) {
$this->freeResult($result);
}

0 comments on commit 39faf67

Please sign in to comment.