Table1 :
id1 | ref_table2 (tinytext)
1 | 2,3,5
2 | 1,3,4
3 | 2
Table2 :
id2 | name2 (tinytext)
1 | abc
2 | def
3 | ghi
4 | jkl
5 | mno
6 | pqr
If I take a specific entry from table1, I'd like to list all table2 items whose ids belong to the "ref" string in table1 (2,3,5).
The desired output for "2,3,5" would be :
id | name
2 | def
3 | ghi
5 | mno