From 274a8fbff490540277ab1270e1e1cda2996bafba Mon Sep 17 00:00:00 2001 From: Jonathan Ernst Date: Sun, 30 Jan 2005 00:58:05 +0000 Subject: [PATCH] fix sql query on index page --- index.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index.php b/index.php index b208c9a..c44f97a 100644 --- a/index.php +++ b/index.php @@ -106,6 +106,7 @@ wine-users mailing list or the wine newsgroup, for more information visit $sQuery = "SELECT appVotes.appId AS appId, COUNT( appVotes.appId ) AS c FROM appVotes, appVersion WHERE appVersion.maintainer_rating = 'Gold' + AND appVersion.appId = appVotes.appId GROUP BY appVotes.appId ORDER BY c DESC LIMIT 10"; @@ -136,6 +137,7 @@ while($oRow = mysql_fetch_object($hResult)) $sQuery = "SELECT appVotes.appId AS appId, COUNT( appVotes.appId ) AS c FROM appVotes, appVersion WHERE appVersion.maintainer_rating = 'Silver' + AND appVersion.appId = appVotes.appId GROUP BY appVotes.appId ORDER BY c DESC LIMIT 10";