Was Sie suchen, ist der GROUP_CONCAT Betreiber.
select user, GROUP_CONCAT(names SEPARATOR ',')
from TABLE1 left join TABLE2 on TABLE1.id = TABLE2.id
group by user
Was Sie suchen, ist der GROUP_CONCAT Betreiber.
select user, GROUP_CONCAT(names SEPARATOR ',')
from TABLE1 left join TABLE2 on TABLE1.id = TABLE2.id
group by user