aboutsummaryrefslogtreecommitdiffstats
path: root/include/ws_functions.inc.php
diff options
context:
space:
mode:
authornikrou <nikrou@piwigo.org>2010-07-03 12:16:12 +0000
committernikrou <nikrou@piwigo.org>2010-07-03 12:16:12 +0000
commitb83df6be6877b167571c68dc71765cd4f979e9e9 (patch)
tree18f520400db0e625450c0004b6f8eeb0541ceac8 /include/ws_functions.inc.php
parent55f4efd7a695ba92e50ddef08aa95d33632971b2 (diff)
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
Diffstat (limited to 'include/ws_functions.inc.php')
-rw-r--r--include/ws_functions.inc.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/ws_functions.inc.php b/include/ws_functions.inc.php
index 34b1403ec..d0b44b0be 100644
--- a/include/ws_functions.inc.php
+++ b/include/ws_functions.inc.php
@@ -285,7 +285,7 @@ SELECT id, name, permalink, image_order
$order_by = empty($order_by) ? $conf['order_by'] : 'ORDER BY '.$order_by;
$query = '
-SELECT i.*, GROUP_CONCAT(category_id) cat_ids
+SELECT i.*, GROUP_CONCAT(category_id) AS cat_ids
FROM '.IMAGES_TABLE.' i
INNER JOIN '.IMAGE_CATEGORY_TABLE.' ON i.id=image_id
WHERE '. implode('
@@ -693,7 +693,7 @@ SELECT COUNT(rate) AS count
}
$query = '
-SELECT COUNT(id) nb_comments
+SELECT COUNT(id) AS nb_comments
FROM '.COMMENTS_TABLE.'
WHERE '.$where_comments;
list($nb_comments) = array_from_query($query, 'nb_comments');
@@ -1454,7 +1454,7 @@ function ws_tags_getImages($params, &$service)
else
{
$query = '
-SELECT image_id, GROUP_CONCAT(tag_id) tag_ids
+SELECT image_id, GROUP_CONCAT(tag_id) AS tag_ids
FROM '.IMAGE_TAG_TABLE.'
WHERE tag_id IN ('.implode(',',$tag_ids).')
GROUP BY image_id';