group_concat MYSQL new line

后端 未结 4 1564
逝去的感伤
逝去的感伤 2020-12-06 10:00
group_concat(A,\' \',B,\' \',C) as Name,

then using this php for displaying

         


        
4条回答
  •  不思量自难忘°
    2020-12-06 10:32

    For MySQL (or plain text) output You could use \n as a separator:

    SELECT GROUP_CONCAT(column1 SEPARATOR '\n') FROM table1;
    

    I use this very often when I need to get many new-line-separated values in one row for other processing.

提交回复
热议问题