mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Merge pull request #11284 from kolorafa/patch-1
msSQL - also handle offset as string
This commit is contained in:
commit
d3a4ce1216
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue