aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authornikrou <nikrou@piwigo.org>2010-06-25 21:21:02 +0000
committernikrou <nikrou@piwigo.org>2010-06-25 21:21:02 +0000
commita9d6cbce34b817eb306bc6bcc98cbb9f67919124 (patch)
treea3fabd792729ac16c9cbc89383eb5ad07709f5f8 /admin
parent1ba096945f7f8c17c392d4e5229c77e73e0bc6c9 (diff)
Bug 1740 fixed : Bug 1740 fixed : Rating page returns database error
Query had incomplete group by clause Merge from branch 2.1 git-svn-id: http://piwigo.org/svn/trunk@6607 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/rating.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/admin/rating.php b/admin/rating.php
index 1d7fa8c26..6fa1c585c 100644
--- a/admin/rating.php
+++ b/admin/rating.php
@@ -171,7 +171,12 @@ SELECT i.id,
FROM '.RATE_TABLE.' AS r
LEFT JOIN '.IMAGES_TABLE.' AS i ON r.element_id = i.id
WHERE 1 = 1 ' . $page['user_filter'] . '
- GROUP BY r.element_id
+ GROUP BY i.id,
+ i.path,
+ i.file,
+ i.tn_ext,
+ i.average_rate,
+ r.element_id
ORDER BY ' . $available_order_by[$order_by_index][1] .'
LIMIT '.$elements_per_page.' OFFSET '.$start.'
;';