Skip to content

Commit

Permalink
fix bug in previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
pasinter committed Jul 27, 2011
1 parent 5d15d80 commit 7619e69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Platforms/DblibPlatform.php
Expand Up @@ -60,7 +60,7 @@ protected function doModifyLimitQuery($query, $limit, $offset = null)

if ($offset == 0) {
// SELECT TOP DISTINCT does not work with mssql
if(preg_match('#^SELECT\s+DISTINCT#i', $query) !== false) {
if(preg_match('#^SELECT\s+DISTINCT#i', $query) > 0) {
$query = preg_replace('/^SELECT\s+DISTINCT\s/i', 'SELECT DISTINCT TOP ' . $count . ' ', $query);
} else {
$query = preg_replace('/^SELECT\s/i', 'SELECT TOP ' . $count . ' ', $query);
Expand Down

0 comments on commit 7619e69

Please sign in to comment.