简体   繁体   中英

Error format with group_concat in php mysql

I have a sample data:

table(id, name) with name(varchar(255))

with data is

table(1, 'test1')
...
     (999, 'test999')
...

Query is Select GROUP_CONCAT(name) AS name FROM table And result is test1test2...test155 => can't get all name of table table, How to fix it ?

try increasing the size of group_concat_max_len in your SESSION before query as:

SET SESSION group_concat_max_len = 1000000;

MySQL manual for group_concat_max_len

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM