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:
@@ -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
|
||||
{
|
||||
|
Reference in New Issue
Block a user