aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_category.inc.php
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--include/functions_category.inc.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/functions_category.inc.php b/include/functions_category.inc.php
index dffb6c337..33b3f92fc 100644
--- a/include/functions_category.inc.php
+++ b/include/functions_category.inc.php
@@ -493,9 +493,9 @@ function initialize_category( $calling_page = 'category' )
{
$page['title'] = $lang['favorites'];
- $page['where'] = ', '.PREFIX_TABLE.'favorites';
+ $page['where'] = ', '.PREFIX_TABLE.'favorites AS fav';
$page['where'].= ' WHERE user_id = '.$user['id'];
- $page['where'].= ' AND image_id = id';
+ $page['where'].= ' AND fav.image_id = id';
$query = 'SELECT COUNT(*) AS nb_total_images';
$query.= ' FROM '.PREFIX_TABLE.'favorites';