diff options
author | rub <rub@piwigo.org> | 2007-04-22 16:19:16 +0000 |
---|---|---|
committer | rub <rub@piwigo.org> | 2007-04-22 16:19:16 +0000 |
commit | 37096826b4f817a65ca6f70abf9f7e583c4e0df4 (patch) | |
tree | 7cb9b0a255b9a999a1b0a9b7ed2891786eabb7e5 /include | |
parent | 4d7cc8e7f176c28fa603ba93094948f635582078 (diff) |
Add filter conditions on new sql query added for feature 660.
git-svn-id: http://piwigo.org/svn/trunk@1971 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include')
-rw-r--r-- | include/category_cats.inc.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/category_cats.inc.php b/include/category_cats.inc.php index a8c6c49ca..4acd7dff4 100644 --- a/include/category_cats.inc.php +++ b/include/category_cats.inc.php @@ -163,8 +163,19 @@ SELECT MIN(date_creation) AS date_creation_min, MAX(date_creation) AS date_creation_max FROM '.IMAGE_CATEGORY_TABLE.' + INNER JOIN '.USER_CACHE_CATEGORIES_TABLE.' + ON category_id = cat_id and user_id = '.$user['id'].' INNER JOIN '.IMAGES_TABLE.' ON image_id = id WHERE category_id IN ('.implode(',', $category_ids).') +'.get_sql_condition_FandF + ( + array + ( + 'visible_categories' => 'category_id', + 'visible_images' => 'image_id' + ), + 'AND' + ).' GROUP BY category_id ;'; $result = pwg_query($query); |