I have a problem with comma separated values when fetch and insert to 1 table from to another table,
my problem is,
I am using PHP, Mysql
table_1 has comma separated values like this
1 | apple1, apple2, apple3
2 | samsung1,samsung2, samsung3, samsung4
3 | nokia1,nokia2
I want to fetch these values from above table and inset to another table with same id, like this
table_2
1 | 1 | apple1
2 | 1 | apple2
3 | 1 | apple3
4 | 2 | samsung1
5 | 2 | samsung2
6 | 2 | samsung3
7 | 2 | samsung4
8 | 3 | nokia1
9 | 3 | nokia2
please anyone can help me to resolve this problem I have a big comma separated table to insert with this,
thanks!