new line separator doesn't work for group_concat function

ε祈祈猫儿з 提交于 2019-12-10 15:43:17

问题


I have a string (name lastname,name2 lastname2...) with values from a database table and I want to display it like:

name lastname
name2 lastname2..

I use group_concat function it works for commma separators but I need new line separator.

group_concat(concat_ws(' ',users.firstname, users.lastname) SEPARATOR '<br>') as contacts_name

回答1:


Try this : "\r\n" with double quotes, not simple



来源:https://stackoverflow.com/questions/17875870/new-line-separator-doesnt-work-for-group-concat-function

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!