From 9fb4ba2b733d59b8a704cb8df846c3b43769503d Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Wed, 12 Apr 2017 18:49:29 +0200 Subject: [PATCH] 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 --- mod/profile.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/profile.php b/mod/profile.php index fbce509d29..a83cb076f2 100644 --- a/mod/profile.php +++ b/mod/profile.php @@ -210,7 +210,7 @@ function profile_content(App $a, $update = 0) { 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` AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0 WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND