aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_user.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/functions_user.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 '')
-rw-r--r--include/functions_user.inc.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/functions_user.inc.php b/include/functions_user.inc.php
index aa35539d6..6eb733bce 100644
--- a/include/functions_user.inc.php
+++ b/include/functions_user.inc.php
@@ -678,10 +678,10 @@ function compute_categories_data(&$cats)
*/
function get_computed_categories($userdata, $filter_days=null)
{
- $query = 'SELECT c.id cat_id, global_rank';
+ $query = 'SELECT c.id AS cat_id, global_rank';
// Count by date_available to avoid count null
$query .= ',
- MAX(date_available) date_last, COUNT(date_available) nb_images
+ MAX(date_available) AS date_last, COUNT(date_available) AS nb_images
FROM '.CATEGORIES_TABLE.' as c
LEFT JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON ic.category_id = c.id
LEFT JOIN '.IMAGES_TABLE.' AS i