mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-11 03:03:01 +02:00
Bug 1754 fixed : The keyword AS is mandatory for alias in PostgreSQL queries
Merge from trunk git-svn-id: http://piwigo.org/svn/branches/2.1@6653 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -36,7 +36,7 @@ function get_available_tags()
|
||||
{
|
||||
// we can find top fatter tags among reachable images
|
||||
$query = '
|
||||
SELECT tag_id, COUNT(DISTINCT(it.image_id)) counter
|
||||
SELECT tag_id, COUNT(DISTINCT(it.image_id)) AS counter
|
||||
FROM '.IMAGE_CATEGORY_TABLE.' ic
|
||||
INNER JOIN '.IMAGE_TAG_TABLE.' it ON ic.image_id=it.image_id'.get_sql_condition_FandF
|
||||
(
|
||||
@@ -223,7 +223,7 @@ function get_common_tags($items, $max_tags, $excluded_tag_ids=null)
|
||||
return array();
|
||||
}
|
||||
$query = '
|
||||
SELECT t.*, count(*) counter
|
||||
SELECT t.*, count(*) AS counter
|
||||
FROM '.IMAGE_TAG_TABLE.'
|
||||
INNER JOIN '.TAGS_TABLE.' t ON tag_id = id
|
||||
WHERE image_id IN ('.implode(',', $items).')';
|
||||
|
||||
Reference in New Issue
Block a user