mirror of
https://github.com/silverstripe/silverstripe-mssql
synced 2024-10-22 06:05:53 +00:00
BUGFIX: Get MSSQL to handle the '## offset ##' style of limit value.
This commit is contained in:
parent
58cca2dfeb
commit
7a1d6d7bcf
@ -999,6 +999,9 @@ class MSSQLDatabase extends Database {
|
||||
if(isset($sqlQuery->limit['start']))
|
||||
$offset=$sqlQuery->limit['start'];
|
||||
|
||||
} else if(preg_match('/^([0-9]+) offset ([0-9]+)$/i', trim($sqlQuery->limit), $matches)) {
|
||||
$limit = $matches[1];
|
||||
$offset = $matches[2];
|
||||
} else {
|
||||
//could be a comma delimited string
|
||||
$bits=explode(',', $sqlQuery->limit);
|
||||
|
Loading…
x
Reference in New Issue
Block a user