Given two tables:
table1:
t1id tinityint
name varchar
table2:
t2id tinyint
t1s varchar - comma-delimited list of t1id's
I need to write a query that returns for each t2id, a broken up list of all t1s name:
t2id(1), name(1)
t2id(1), name(2)
t2id(2), name(1)
t2id(2), name(3)
I thought the following query might do it, but it only returns the first entry:
select t2id, name from table1, table2 where t1id in (t1s)
Is there a way of getting this to work with MySQL?