mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-14679 fixing limitfrom, limitnum queries under pgsql, mssql and oracle
This commit is contained in:
parent
bb1dff214d
commit
72a3902f5a
3 changed files with 62 additions and 71 deletions
|
@ -585,7 +585,7 @@ class pgsql_native_moodle_database extends moodle_database {
|
|||
$limitnum = ($limitnum < 0) ? 0 : $limitnum;
|
||||
if ($limitfrom or $limitnum) {
|
||||
if ($limitnum < 1) {
|
||||
$limitnum = "18446744073709551615";
|
||||
$limitnum = "ALL";
|
||||
}
|
||||
$sql .= " LIMIT $limitnum OFFSET $limitfrom";
|
||||
}
|
||||
|
@ -624,7 +624,7 @@ class pgsql_native_moodle_database extends moodle_database {
|
|||
$limitnum = ($limitnum < 0) ? 0 : $limitnum;
|
||||
if ($limitfrom or $limitnum) {
|
||||
if ($limitnum < 1) {
|
||||
$limitnum = "18446744073709551615";
|
||||
$limitnum = "ALL";
|
||||
}
|
||||
$sql .= " LIMIT $limitnum OFFSET $limitfrom";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue