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/functions_notification.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/functions_notification.inc.php') diff --git a/include/functions_notification.inc.php b/include/functions_notification.inc.php index edffe9f99..eecdf1a5e 100644 --- a/include/functions_notification.inc.php +++ b/include/functions_notification.inc.php @@ -476,8 +476,8 @@ function get_recent_post_dates($max_dates, $max_elements, $max_cats) $query = ' SELECT date_available, - COUNT(DISTINCT id) nb_elements, - COUNT(DISTINCT category_id) nb_cats + COUNT(DISTINCT id) AS nb_elements, + COUNT(DISTINCT category_id) AS nb_cats FROM '.IMAGES_TABLE.' i INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON id=image_id '.$where_sql.' GROUP BY date_available @@ -515,7 +515,7 @@ SELECT id, path, name, tn_ext, file if ($max_cats>0) {// get some categories ... $query = ' -SELECT c.uppercats, COUNT(DISTINCT i.id) img_count +SELECT c.uppercats, COUNT(DISTINCT i.id) AS img_count FROM '.IMAGES_TABLE.' i INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON i.id=image_id INNER JOIN '.CATEGORIES_TABLE.' c ON c.id=category_id '.$where_sql.' -- cgit v1.2.3