Fix profile wrong DISTINCT + ORDER BY

Fix: ERROR 3065 (HY000) Expression #1 of ORDER BY clause is not in
SELECT list, references column 'friendica.item.created' which is not in
SELECT list; this is incompatible with DISTINCT
This commit is contained in:
Alexandre Alapetite 2017-04-12 18:49:29 +02:00
parent 74b6d09e89
commit 9fb4ba2b73

View File

@ -210,7 +210,7 @@ function profile_content(App $a, $update = 0) {
if ($update) { if ($update) {
$r = q("SELECT distinct(parent) AS `item_id`, `item`.`network` AS `item_network` $r = q("SELECT distinct(parent) AS `item_id`, `item`.`network` AS `item_network`, `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 `contact`.`blocked` = 0 AND `contact`.`pending` = 0 AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND