根据find throughMySQL GROUP_CONCAT escaping我已经使用了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()
它。explode("0x1D", $comment) or explode("\0x1D", $comment)
这不起作用。
最佳答案
如果仍要使用0x1D作为seprator,可以使用以下语法:
explode("\x1D", $comment)
关于php - 使用GROUP SEPARATOR的explode()函数,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/16476506/