SELECT A.id, A.title,
FROM (`table`) as A
WHERE A.active = '1'
AND A.id IN (SELECT GROUP_CONCAT(B.id) from B where user = 3)
If i launch subquery SELECT GROUP_CONCAT(B.id) from B where user = 3
only, i obtain 1,2,3,4. But if i launch entire query i obtain only one row.
But if i try to substitute the subquery with its value (1,2,3,4)
SELECT A.id, A.title,
FROM (`table`) as A
WHERE A.active = '1'
AND A.id IN (1,2,3,4)
i obtain the 4 rows ... as i need.
Where is my error ?