This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Merge pull request #1818 from MDunkleSr/patch-3

Update libraries/joomla/database/driver/sqlsrv.php
  • Loading branch information...
dongilbert committed Apr 14, 2013
2 parents 2556578 + 5b983e1 commit 7172fb59d4d611e7e1038c182a1d4c331c05ca38
Showing with 1 addition and 1 deletion.
  1. +1 −1 libraries/joomla/database/driver/sqlsrv.php
@@ -985,7 +985,7 @@ protected function limit($sql, $limit, $offset)
$rowNumberText = ',ROW_NUMBER() OVER (' . $orderBy . ') AS RowNumber FROM ';
$sql = preg_replace('/\\s+FROM/', '\\1 ' . $rowNumberText . ' ', $sql, 1);
- $sql = 'SELECT TOP ' . $this->limit . ' * FROM (' . $sql . ') _myResults WHERE RowNumber > ' . $this->offset;
+ $sql = 'SELECT TOP ' . $this->limit . ' * FROM (' . $sql . ') _myResults WHERE RowNumber > ' . $this->offset . ' ORDER BY RowNumber';
return $sql;
}

0 comments on commit 7172fb5

Please sign in to comment.