From dff3bb0773095d808819ec42ba047b8e7aa7d21f Mon Sep 17 00:00:00 2001 From: "deb.monish" Date: Mon, 26 Jun 2017 18:18:03 +0530 Subject: [PATCH] CRM-20411: mailing tab listing: MySQL 5.7 group by error --- api/v3/MailingContact.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/v3/MailingContact.php b/api/v3/MailingContact.php index b0fd28e891..9d14e1030c 100644 --- a/api/v3/MailingContact.php +++ b/api/v3/MailingContact.php @@ -159,7 +159,7 @@ GROUP BY m.id } $select = implode(', ', $select); - $orderBy = 'ORDER BY j.start_date DESC'; + $orderBy = 'ORDER BY MIN(j.start_date) DESC'; if ($sort) { $orderBy = "ORDER BY $sort"; } -- 2.25.1