Sort apps by name in 'browse by rating' list

This commit is contained in:
Alexander Nicolaysen Sørnes
2008-02-25 20:25:49 +01:00
committed by Chris Morgan
parent 0ea7d306d8
commit fb0c66b586

View File

@@ -463,11 +463,14 @@ class Application {
public static function getWithRating($sRating, $iOffset, $iItemsPerPage)
{
$aApps = array();
$sQuery = "SELECT DISTINCT appId
FROM appVersion
WHERE rating = '?'
AND state = 'accepted'
ORDER BY appId ASC LIMIT ?, ?";
$sQuery = "SELECT DISTINCT appVersion.appId, appName
FROM appVersion, appFamily WHERE
appVersion.appId = appFamily.appId
AND
rating = '?'
AND
appVersion.state = 'accepted'
ORDER BY appName ASC LIMIT ?, ?";
if($hResult = query_parameters($sQuery, $sRating, $iOffset, $iItemsPerPage))
{