aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_notification.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_notification.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_notification.inc.php')
-rw-r--r--include/functions_notification.inc.php6
1 files changed, 3 insertions, 3 deletions
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.'