summaryrefslogtreecommitdiffstats
path: root/web/html
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-04-26 06:23:00 +0200
committerLukas Fleischer <archlinux@cryptocrack.de>2011-04-27 14:50:27 +0200
commitfcda6671f3021273844f7898c7cfec1e99df8ec2 (patch)
tree51dd4ce96f95765f15d807de37e664497e164b71 /web/html
parented9c95623fcf3b46e42dfbb2596abbf4c55107a3 (diff)
downloadaur-fcda6671f3021273844f7898c7cfec1e99df8ec2.tar.gz
aur-fcda6671f3021273844f7898c7cfec1e99df8ec2.tar.xz
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>
Diffstat (limited to 'web/html')
-rw-r--r--web/html/rss.php2
-rw-r--r--web/html/tu.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/web/html/rss.php b/web/html/rss.php
index cb0bf40f..05478154 100644
--- a/web/html/rss.php
+++ b/web/html/rss.php
@@ -32,7 +32,7 @@ $rss->image = $image;
$dbh = db_connect();
$q = "SELECT * FROM Packages ";
$q.= "ORDER BY SubmittedTS DESC ";
-$q.= "LIMIT 0 , 20";
+$q.= "LIMIT 20";
$result = db_query($q, $dbh);
while ($row = mysql_fetch_assoc($result)) {
diff --git a/web/html/tu.php b/web/html/tu.php
index 941e6eda..dc1c5e36 100644
--- a/web/html/tu.php
+++ b/web/html/tu.php
@@ -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;