[DATABASE] Consistently use the "LIMIT $limit OFFSET $offset" syntax

The "LIMIT $offset, $limit" syntax is only supported by MySQL and MariaDB.
This commit is contained in:
Alexei Sorokin
2019-09-11 10:12:49 +03:00
parent 44f4c9374d
commit 6911b499d3
15 changed files with 403 additions and 576 deletions

View File

@@ -848,11 +848,7 @@ class User extends Managed_DataObject
'ORDER BY u.created DESC ';
if ($offset > 0) {
if (common_config('db','type') == 'pgsql') {
$qry .= ' LIMIT ' . $limit . ' OFFSET ' . $offset;
} else {
$qry .= ' LIMIT ' . $offset . ', ' . $limit;
}
$qry .= ' LIMIT ' . $limit . ' OFFSET ' . $offset;
}
$apps = new Oauth_application_user();