aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2005-01-07 23:51:48 +0000
committerplegall <plg@piwigo.org>2005-01-07 23:51:48 +0000
commit6f12edb74a6613e623ae44c90936e4c7c5573c76 (patch)
treedf0961d9cbdd317a26405ad3350f3a12c20bfe54
parent62446548726c53e5b98c341038a94e4905f6487e (diff)
- bug fixed : if an element is linked more than once, bug on count of total
elements of best rated category git-svn-id: http://piwigo.org/svn/trunk@676 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r--include/functions_category.inc.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/functions_category.inc.php b/include/functions_category.inc.php
index 715aacb97..67be45b0e 100644
--- a/include/functions_category.inc.php
+++ b/include/functions_category.inc.php
@@ -665,7 +665,7 @@ SELECT COUNT(DISTINCT(id)) AS nb_total_images
// $page['cat_nb_images'] equals $conf['top_number'] unless there
// are less rated items
$query ='
-SELECT COUNT(1) AS count
+SELECT COUNT(DISTINCT(id)) AS count
FROM '.IMAGES_TABLE.'
INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON id = ic.image_id
'.$page['where'].'