mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-06-02 04:15:05 +02:00
- reoptimize queries for MySql
- week starts on monday/sunday applies also to weekly calendar git-svn-id: http://piwigo.org/svn/trunk@12118 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -228,13 +228,17 @@ SELECT t.*, count(*) AS counter
|
||||
AND tag_id NOT IN ('.implode(',', $excluded_tag_ids).')';
|
||||
}
|
||||
$query .='
|
||||
GROUP BY tag_id, t.id, t.name, t.url_name';
|
||||
GROUP BY t.id
|
||||
ORDER BY ';
|
||||
if ($max_tags>0)
|
||||
{
|
||||
$query .= '
|
||||
ORDER BY counter DESC
|
||||
$query .= 'counter DESC
|
||||
LIMIT '.$max_tags;
|
||||
}
|
||||
else
|
||||
{
|
||||
$query .= 'NULL';
|
||||
}
|
||||
|
||||
$result = pwg_query($query);
|
||||
$tags = array();
|
||||
|
||||
Reference in New Issue
Block a user