mirror of
https://github.com/Piwigo/Piwigo.git
synced 2025-04-27 19:59:56 +03:00
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
This commit is contained in:
parent
58cb482d7a
commit
dd955526ae
4 changed files with 10 additions and 10 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue