我需要在子查询中进行子查询是什么导致“'where 子句'中的未知列't1.product_id'”。它在第 7 行。在我的示例中。如何解决这个问题呢?
SELECT *,product_id id,
(SELECT GROUP_CONCAT (value ORDER By `order` ASC SEPARATOR ', ')
FROM (
SELECT `order`,value
FROM slud_data
LEFT JOIN slud_types ON slud_types.type_id=slud_data.type_id
WHERE slud_data.product_id = t1.product_id
AND value!='' AND display=0
LIMIT 3
) tmp) text
FROM slud_products t1
WHERE
now() < DATE_ADD(date,INTERVAL +ttl DAY) AND activated=1
ORDER BY t1.date DESC