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:
commit
2ef23300a3
|
@ -253,7 +253,7 @@ function profile_content(App $a, $update = 0)
|
||||||
$sql_extra4 = " AND `item`.`received` > '" . $gmupdate . "'";
|
$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`
|
FROM `item` INNER JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
|
||||||
AND NOT `contact`.`blocked` AND NOT `contact`.`pending`
|
AND NOT `contact`.`blocked` AND NOT `contact`.`pending`
|
||||||
WHERE `item`.`uid` = %d AND `item`.`visible` AND
|
WHERE `item`.`uid` = %d AND `item`.`visible` AND
|
||||||
|
|
Loading…
Reference in a new issue