This is my table that I have. I want to Insert comma separated values from tag_title column to tagList column matching the fk_ContentDataID which is unique. Can I do it on MySQL or do I need a PHP Script for this.

**fk_contentDataID             fk_tagID       tag_title                  tagList**
68                                 789          ANGELINA JOLIE              NULL
1325                               789          ANGELINA JOLIE              NULL  
1986                               789          ANGELINA JOLIE              NULL  
2052                               789          ANGELINA JOLIE              NULL  
2145                               789          ANGELINA JOLIE              NULL  
有帮助吗?

解决方案

UPDATE Table SET tagList = REPLACE(tag_title,' ',',');

Hope this is what you were looking for

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top