aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-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'].'