This commit is contained in:
Michael RICOIS 2018-02-22 17:54:49 +01:00
parent 013e705e94
commit cf142b7071

View File

@ -38,8 +38,10 @@ class AdminCustomerThreads extends AdminTab
$this->view = true;
$this->delete = true;
$this->_select = 'CONCAT(c.firstname," ",c.lastname) as customer, cl.name as contact, l.name as language, group_concat(message) as messages, (
SELECT IFNULL(CONCAT(LEFT(e.firstname, 1),". ",e.lastname), "--")
$this->_select = '
CONCAT(c.firstname, " ", c.lastname) as customer, cl.name as contact,
l.name as language, group_concat(message) as messages,
(SELECT IFNULL(CONCAT(LEFT(e.firstname, 1), ". ", e.lastname), "--")
FROM '._DB_PREFIX_.'customer_message cm2 INNER JOIN '._DB_PREFIX_.'employee e ON e.id_employee = cm2.id_employee
WHERE cm2.id_employee > 0 AND cm2.`id_customer_thread` = a.`id_customer_thread`
ORDER BY cm2.date_add DESC LIMIT 1