summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2019-05-09 20:43:47 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2019-06-09 14:12:06 +0100
commit5fdda034d070a174a362c7e2b89dc66f3bb89bec (patch)
treed2ae719b5f68e940eeaf7bdc74cb55142f580d15
parentGet glibmm and libxml++ flags from pkg-config (diff)
downloadgentoobrowse-api-5fdda034d070a174a362c7e2b89dc66f3bb89bec.tar.bz2
gentoobrowse-api-5fdda034d070a174a362c7e2b89dc66f3bb89bec.tar.xz
gentoobrowse-api-5fdda034d070a174a362c7e2b89dc66f3bb89bec.zip
Add extra order by clause to getTopTrackedPackages
Ensure predictable result order
-rw-r--r--gentoobrowse-api/service/sql/portage/getTopTrackedPackages.sql2
1 files changed, 1 insertions, 1 deletions
diff --git a/gentoobrowse-api/service/sql/portage/getTopTrackedPackages.sql b/gentoobrowse-api/service/sql/portage/getTopTrackedPackages.sql
index c328d73..16e711a 100644
--- a/gentoobrowse-api/service/sql/portage/getTopTrackedPackages.sql
+++ b/gentoobrowse-api/service/sql/portage/getTopTrackedPackages.sql
@@ -2,5 +2,5 @@ SELECT p.packageid, p.categoryid, p.name, p.description, p.summary, p.firstseen,
FROM gentoobrowse.packages p, gentoobrowse.user_packages up
WHERE p.packageid = up.packageid
GROUP BY p.packageid
-ORDER BY COUNT(*) DESC
+ORDER BY COUNT(*) DESC, p.packageid
LIMIT ?