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:
nikrou
2010-07-03 12:16:12 +00:00
parent 55f4efd7a6
commit b83df6be68
4 changed files with 10 additions and 10 deletions
+2 -2
View File
@@ -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).')';