$string
=
'1,2,3,4,5'
$array
=
explode(',',$string)
之后就得出一个数组,$array(1,2,3,4,5)
SELECT * , substring(content,charindex(N'厉害了',content),3) as [厉害了] FROM news WHERE content LIKE %厉害了%我的哥%’SELECT * , substring(content,charindex('我的哥',content),3) as [我的哥] FROM news WHERE content LIKE %厉害了%我的哥%’
SQL:select concat("'",replace('1234aff,afd,defg,d',",","','"),"'")
处理步骤:
将原字符串中的,替换为',' 即replace('1234aff,afd,defg,d',",","','")
在替换后的字符串首位添加' concat(str1,str2)
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)