diff options
author | z0rglub <z0rglub@piwigo.org> | 2004-08-21 13:10:25 +0000 |
---|---|---|
committer | z0rglub <z0rglub@piwigo.org> | 2004-08-21 13:10:25 +0000 |
commit | 46938a8f256ae5d441e6b736604e37e8ca265ce1 (patch) | |
tree | 8916f20f08b7b7f574d2a8a5c3acd887cb1510f4 /include | |
parent | df07f5c59aeebc25c24de07177c101b5e8ed13ea (diff) |
add in comment another possibility for counting user total number of
viewable elements (counting only once pictures linked to several categories)
git-svn-id: http://piwigo.org/svn/trunk@490 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | include/functions_category.inc.php | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/include/functions_category.inc.php b/include/functions_category.inc.php index 47db0e75f..8ff06ede7 100644 --- a/include/functions_category.inc.php +++ b/include/functions_category.inc.php @@ -256,7 +256,18 @@ function count_user_total_images() if ( count( $user['restrictions'] ) > 0 ) $query.= ' WHERE id NOT IN ('.$user['forbidden_categories'].')'; $query.= ';'; - + +// $query = ' +// SELECT COUNT(DISTINCT(image_id)) as total +// FROM '.PREFIX_TABLE.'image_category'; +// if (count($user['restrictions']) > 0) +// { +// $query.= ' +// WHERE category_id NOT IN ('.$user['forbidden_categories'].')'; +// } +// $query = ' +// ;'; + $row = mysql_fetch_array( mysql_query( $query ) ); if ( !isset( $row['total'] ) ) $row['total'] = 0; |