I need to do subquery in subquery what causes "Unknown column 't1.product_id' in 'where clause'". It's on line 7. in my example. How to solve this problem?
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
This question continues from http://stackoverflow.com/questions/3378324/limit-ignored-in-query-with-group-concat