使用GROUP SEPARATOR的explode()函数 [英] explode() function using GROUP SEPARATOR
本文介绍了使用GROUP SEPARATOR的explode()函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
根据通过 MySQL GROUP_CONCAT进行转义的查找,我已经使用了GROUP_CONCAT
As per find through MySQL GROUP_CONCAT escaping this I have use GROUP_CONCAT
SELECT
`topic_response`.`response`,
GROUP_CONCAT(`comment` SEPARATOR 0x1D ) AS `comment`,
`topic_response`.`add_date`
FROM `topic_response`
WHERE (topic_id = 286)
AND (`comment` IS NOT NULL)
GROUP BY `response`
ORDER BY `add_date` desc
然后我的输出已正确分隔,但我不知道如何explode()
.
Then my output is properly separated but I don't know how to explode()
it.
explode("0x1D", $comment) or explode("\0x1D", $comment)
这不起作用.
推荐答案
我对explode
使用了chr
函数.基本上0x1D
是ascii
字符串29
I have use chr
function for explode
.Basically 0x1D
is ascii
string 29
explode(chr(29), $comment)
毫无疑问,它可以在所有条件下解决.
Without no any doubts it solves in all condition.
这篇关于使用GROUP SEPARATOR的explode()函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文