summaryrefslogtreecommitdiffstats
path: root/web/lib
diff options
context:
space:
mode:
Diffstat (limited to 'web/lib')
-rw-r--r--web/lib/acctfuncs.inc2
-rw-r--r--web/lib/pkgfuncs.inc2
2 files changed, 2 insertions, 2 deletions
diff --git a/web/lib/acctfuncs.inc b/web/lib/acctfuncs.inc
index fe1cfb1a..8e2ecb33 100644
--- a/web/lib/acctfuncs.inc
+++ b/web/lib/acctfuncs.inc
@@ -405,7 +405,7 @@ function search_results_page($UTYPE,$O=0,$SB="",$U="",$T="",
break;
}
$search_vars[] = "SB";
- $q.= "LIMIT ". $OFFSET . ", " . $HITS_PER_PAGE;
+ $q.= "LIMIT " . $HITS_PER_PAGE . " OFFSET " . $OFFSET;
$dbh = db_connect();
diff --git a/web/lib/pkgfuncs.inc b/web/lib/pkgfuncs.inc
index 8f90d0e3..7b43e45e 100644
--- a/web/lib/pkgfuncs.inc
+++ b/web/lib/pkgfuncs.inc
@@ -501,7 +501,7 @@ function pkg_search_page($SID="") {
break;
}
- $q_limit = "LIMIT ".$_GET["O"].", ".$_GET["PP"];
+ $q_limit = "LIMIT ".$_GET["PP"]." OFFSET ".$_GET["O"];
$q = $q_select . $q_from . $q_from_extra . $q_where . $q_sort . $q_limit;
$q_total = "SELECT COUNT(*) " . $q_from . $q_where;