I have new table in database to track tags, like so:
TAG NAME | IMAGE ID
funny 570
funny 571
dog 649
and I have old table to track tags, like so:
TAG ID | TAG NAME | IMAGES IDS
11 funny 570,571,572,573,574,575,576,577,578,579,580,581,58...
12 dog 649,650,651,652,653,654,655,656,657,658,659,660,66...
13 cat 844,845,846,847,848,849,850,851,852,853,854,855,85...
I need to add all the old image IDs / associated tags to new table
If i am not wrong you want to add old table record to new table.
So all you need to do is query old table and explode imgid and loop through exploded string and add it in new table.
Sample Code.