aboutsummaryrefslogtreecommitdiffstats
path: root/include/ws_functions.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/ws_functions.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 '')
-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';