mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
SQL: use standard LIMIT/OFFSET syntax
Increases compatibility with standard SQL dialect. Thanks-to: elij <elij.mx@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
parent
ed9c95623f
commit
fcda6671f3
4 changed files with 4 additions and 4 deletions
|
@ -119,7 +119,7 @@ if ($atype == "Trusted User" OR $atype == "Developer") {
|
|||
}
|
||||
|
||||
$order = ($by == 'asc') ? 'ASC' : 'DESC';
|
||||
$lim = ($limit > 0) ? " LIMIT $off, $limit" : "";
|
||||
$lim = ($limit > 0) ? " LIMIT $limit OFFSET $off" : "";
|
||||
$by_next = ($by == 'desc') ? 'asc' : 'desc';
|
||||
|
||||
$q = "SELECT * FROM TU_VoteInfo WHERE End > " . time() . " ORDER BY Submitted " . $order;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue