之前在对织梦tag表转迅睿CMS的时候,要对taglist进行合并拆分。
将数据查询并分隔的SQL语句为:
SELECT a.id, substring_index( substring_index( a.name, ',', b.help_topic_id + 1 ), ',',- 1 ) name FROM table1 a JOIN MySQL.help_topic b ON b.help_topic_id < ( length( a.name ) - length(...
MySQL查询包含逗号的数据,将逗号轮训拆分为多行展现的方法
之前在对织梦tag表转迅睿CMS的时候,要对taglist进行合并拆分。
将数据查询并分隔的SQL语句为:
SELECT a.id, substring_index( substring_index( a.name, ',', b.help_topic_id + 1 ), ',',- 1 ) name FROM table1 a JOIN MySQL.help_topic b ON b.help_topic_id < ( length( a.name ) - length(...