SELECT attachment FROM hljtxeip_draft_notice
select a.ID,substring_index(substring_index(a.attachment,',',b.help_topic_id+1),',',-1)
from
hljtxeip_draft_notice a
join
mysql.help_topic b
on b.help_topic_id < (length(a.attachment) - length(replace(a.attachment,',',''))+1)
where substring_index(substring_index(a.attachment,',',b.help_topic_id+1),',',-1) != ''
order by a.ID;