From d364392c457f44318fd25e7831125bd45da7b2ec Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Sat, 28 Sep 2002 12:50:59 +0000 Subject: [PATCH] Replace the outer row offset ... I'm sure I removed this for a reason but the problems it's caused seem widespread so .. hopefully this won't add new (or old) problems ... git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@2906 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/db/msaccess.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/phpBB/db/msaccess.php b/phpBB/db/msaccess.php index 306c8418d2..3424763675 100644 --- a/phpBB/db/msaccess.php +++ b/phpBB/db/msaccess.php @@ -117,7 +117,7 @@ class sql_db $query = "TOP " . ( $row_offset + $num_rows ) . $query; } - $this->result = odbc_exec($this->db_connect_id, "SELECT $query"); + $this->result = odbc_exec($this->db_connect_id, "SELECT $query"); if( $this->result ) { @@ -137,7 +137,7 @@ class sql_db $row_outer_max = ( isset($num_rows) ) ? $row_offset + $num_rows + 1 : 1E9; $row_inner = 0; - while( odbc_fetch_row($this->result) && $row_outer < $row_outer_max ) + while( odbc_fetch_row($this->result, $row_outer) && $row_outer < $row_outer_max ) { for($j = 0; $j < count($this->field_names[$this->result]); $j++) { @@ -148,7 +148,7 @@ class sql_db $row_inner++; } - $this->num_rows[$this->result] = count($this->result_rowset[$this->result]); + $this->num_rows[$this->result] = count($this->result_rowset[$this->result]); odbc_free_result($this->result); } @@ -165,7 +165,7 @@ class sql_db { if( odbc_fetch_row($result_id) ) { - $this->next_id[$this->db_connect_id] = odbc_result($result_id, 1); + $this->next_id[$this->db_connect_id] = odbc_result($result_id, 1); $this->affected_rows[$this->db_connect_id] = odbc_num_rows($this->result); } } @@ -232,7 +232,7 @@ class sql_db // function sql_numrows($query_id = 0) { - if( !$query_id ) + if( !$query_id ) { $query_id = $this->result; }