aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_tag.inc.php
diff options
context:
space:
mode:
authornikrou <nikrou@piwigo.org>2010-07-03 12:12:25 +0000
committernikrou <nikrou@piwigo.org>2010-07-03 12:12:25 +0000
commitdd955526ae97b8f830db2f499ab5c57efe874e5b (patch)
treefeeef38544f20ffe6c74ced4d1f60abe2fad7913 /include/functions_tag.inc.php
parent58cb482d7a81bad7b698a86175f79ac494c37dde (diff)
Bug 1754 fixed : The keyword AS is mandatory for alias in PostgreSQL queries
git-svn-id: http://piwigo.org/svn/trunk@6652 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/functions_tag.inc.php')
-rw-r--r--include/functions_tag.inc.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/functions_tag.inc.php b/include/functions_tag.inc.php
index f05746b31..0f5859333 100644
--- a/include/functions_tag.inc.php
+++ b/include/functions_tag.inc.php
@@ -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).')';