Merge pull request #11284 from kolorafa/patch-1

msSQL - also handle offset as string
This commit is contained in:
Mark Story 2017-10-13 21:55:21 -04:00 committed by GitHub
commit d3a4ce1216

View file

@ -411,7 +411,7 @@ class Sqlserver extends DboSource {
$rt = ' TOP';
}
$rt .= sprintf(' %u', $limit);
if (is_int($offset) && $offset > 0) {
if ((is_int($offset) || ctype_digit($offset)) && $offset > 0) {
$rt = sprintf(' OFFSET %u ROWS FETCH FIRST %u ROWS ONLY', $offset, $limit);
}
return $rt;