1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

- bugfix roll

- fixed sql_query_limit on mssql/mssql_odbc


git-svn-id: file:///svn/phpbb/trunk@6024 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2006-06-08 20:26:03 +00:00
parent 580a318d16
commit ef08df5675
10 changed files with 86 additions and 28 deletions

View File

@@ -146,7 +146,7 @@ class dbal_mssql_odbc extends dbal
$total = -1;
}
$row_offset = ($total) ? $offset : '';
$row_offset = ($total) ? $offset : 0;
$num_rows = ($total) ? $total : $offset;
if (strpos($query, 'SELECT DISTINCT') === 0)
@@ -158,7 +158,18 @@ class dbal_mssql_odbc extends dbal
$query = 'SELECT TOP ' . ($row_offset + $num_rows) . ' ' . substr($query, 6);
}
return $this->sql_query($query, $cache_ttl);
$result = $this->sql_query($query, $cache_ttl);
// Seek by $row_offset rows
if ($row_offset)
{
for ($i = 0; $i < $row_offset; $i++)
{
$this->sql_fetchrow($result);
}
}
return $result;
}
else
{