Alexander Nicolaysen Sørnes : Sort apps by name in 'browse by rating' list
Chris Morgan
cmorgan at winehq.org
Mon Feb 25 20:04:22 CST 2008
Module: appdb
Branch: master
Commit: fb0c66b5868522e8988056e7b81106f3a269d962
URL: http://source.winehq.org/git/appdb.git/?a=commit;h=fb0c66b5868522e8988056e7b81106f3a269d962
Author: Alexander Nicolaysen Sørnes <alex at thehandofagony.com>
Date: Mon Feb 25 20:25:49 2008 +0100
Sort apps by name in 'browse by rating' list
---
include/application.php | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/include/application.php b/include/application.php
index 24eccd5..3dd8c77 100644
--- a/include/application.php
+++ b/include/application.php
@@ -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))
{
More information about the wine-cvs
mailing list