From dd955526ae97b8f830db2f499ab5c57efe874e5b Mon Sep 17 00:00:00 2001 From: nikrou Date: Sat, 3 Jul 2010 12:12:25 +0000 Subject: 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 --- include/ws_functions.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/ws_functions.inc.php') 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'; -- cgit v1.2.3