From 6f12edb74a6613e623ae44c90936e4c7c5573c76 Mon Sep 17 00:00:00 2001 From: plegall Date: Fri, 7 Jan 2005 23:51:48 +0000 Subject: [PATCH] - 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 --- include/functions_category.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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'].'