Merge pull request #6179 from Alkarex/sql-distinct-fix

Fix SQL grammar error: ORDER BY clause is not in SELECT
This commit is contained in:
Hypolite Petovan 2018-11-21 08:07:33 -05:00 committed by GitHub
commit 2ef23300a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -253,7 +253,7 @@ function profile_content(App $a, $update = 0)
$sql_extra4 = " AND `item`.`received` > '" . $gmupdate . "'";
}
$items = q("SELECT DISTINCT(`parent-uri`) AS `uri`
$items = q("SELECT DISTINCT(`parent-uri`) AS `uri`, `item`.`created`
FROM `item` INNER JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
AND NOT `contact`.`blocked` AND NOT `contact`.`pending`
WHERE `item`.`uid` = %d AND `item`.`visible` AND