Fix GROUP BY in acl_selector, api, notifier, photos, messages

https://github.com/friendica/friendica/issues/3322
This commit is contained in:
Alexandre Alapetite
2017-04-12 15:11:50 +02:00
parent c3e933642e
commit 74b6d09e89
7 changed files with 14 additions and 12 deletions
+2 -2
View File
@@ -51,7 +51,7 @@ function photo_albums($uid, $update = false) {
$albums = qu("SELECT COUNT(DISTINCT `resource-id`) AS `total`, `album`
FROM `photo`
WHERE `uid` = %d AND `album` != '%s' AND `album` != '%s' $sql_extra
GROUP BY `album` ORDER BY `created` DESC",
GROUP BY `album`, `created` ORDER BY `created` DESC",
intval($uid),
dbesc('Contact Photos'),
dbesc(t('Contact Photos'))
@@ -61,7 +61,7 @@ function photo_albums($uid, $update = false) {
$albums = qu("SELECT DISTINCT(`album`), '' AS `total`
FROM `photo`
WHERE `uid` = %d AND `album` != '%s' AND `album` != '%s' $sql_extra
GROUP BY `album` ORDER BY `created` DESC",
GROUP BY `album`, `created` ORDER BY `created` DESC",
intval($uid),
dbesc('Contact Photos'),
dbesc(t('Contact Photos'))