문제

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