aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_tag.inc.php
diff options
context:
space:
mode:
authornikrou <nikrou@piwigo.org>2009-11-29 14:06:16 +0000
committernikrou <nikrou@piwigo.org>2009-11-29 14:06:16 +0000
commitad796f152f38a37c3c9be438ee9a79ba7b307ebd (patch)
tree4862e6895ff5bee4f38914d942cda31ffa66b7c1 /include/functions_tag.inc.php
parentc96097529e49943eddba78d70e23e38c0eac494d (diff)
Feature_1255:
- bug fix : function pwg_db_get_recent_period_expression - add extra fields for select based on "order by" git-svn-id: http://piwigo.org/svn/trunk@4387 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/functions_tag.inc.php')
-rw-r--r--include/functions_tag.inc.php10
1 files changed, 2 insertions, 8 deletions
diff --git a/include/functions_tag.inc.php b/include/functions_tag.inc.php
index a05174159..e3018f792 100644
--- a/include/functions_tag.inc.php
+++ b/include/functions_tag.inc.php
@@ -49,8 +49,7 @@ SELECT tag_id, COUNT(DISTINCT(it.image_id)) counter
'
WHERE'
).'
- GROUP BY tag_id
- ORDER BY NULL';
+ GROUP BY tag_id';
$tag_counters = simple_hash_from_query($query, 'tag_id', 'counter');
if ( empty($tag_counters) )
@@ -234,18 +233,13 @@ SELECT t.*, count(*) counter
AND tag_id NOT IN ('.implode(',', $excluded_tag_ids).')';
}
$query .='
- GROUP BY tag_id';
+ GROUP BY tag_id, t.id, t.name, t.url_name';
if ($max_tags>0)
{
$query .= '
ORDER BY counter DESC
LIMIT '.$max_tags;
}
- else
- {
- $query .= '
- ORDER BY NULL';
- }
$result = pwg_query($query);
$tags = array();