aboutsummaryrefslogtreecommitdiffstats
path: root/admin/cat_options.php
diff options
context:
space:
mode:
Diffstat (limited to 'admin/cat_options.php')
-rw-r--r--admin/cat_options.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/admin/cat_options.php b/admin/cat_options.php
index 7f4b3f5e1..ca07d37a3 100644
--- a/admin/cat_options.php
+++ b/admin/cat_options.php
@@ -286,10 +286,9 @@ SELECT id,name,uppercats,global_rank
WHERE representative_picture_id IS NOT NULL
;';
$query_false = '
-SELECT id,name,uppercats,global_rank
- FROM '.CATEGORIES_TABLE.'
- WHERE nb_images != 0
- AND representative_picture_id IS NULL
+SELECT DISTINCT id,name,uppercats,global_rank
+ FROM '.CATEGORIES_TABLE.' INNER JOIN '.IMAGE_CATEGORY_TABLE.' ON id=category_id
+ WHERE representative_picture_id IS NULL
;';
$template->assign(
array(