首页 > 技术文章 > mysql中 group_concat长度限制

icyy 2015-11-27 12:25 原文

//这个函数有长度限制,上了多次当。默认长度1024长度。

select group_concat(id) from table;

 

要彻底修改,在MySQL配置文件(my.ini)中加上

group_concat_max_len = -1  # -1为最大值或填入你要的最大长度

#并重启mysql

#在客户端执行语句:

#show variables like "group_concat_max_len";  

#如果为自己修改的值或4294967295(设置为-1时)则修改正确。

 

 

正则匹配汉字:

preg_match_all('/[\x{4e00}-\x{9fff}]+/u', $message, $temp_message);

推荐阅读