Home >Database >Mysql Tutorial >error code [1260]; %d line(s) were cut by GROUP_CONCAT();_MySQL

error code [1260]; %d line(s) were cut by GROUP_CONCAT();_MySQL

WBOY
WBOYOriginal
2016-06-01 13:08:541915browse

GROUP_CONCAT有个最大长度的限制,超过最大长度就会被截断掉,你可以通过下面的语句获得: 

mysql> SELECT @@global.group_concat_max_len; 
+-------------------------------+ 
| @@global.group_concat_max_len | 
+-------------------------------+ 
|                      1024     | 
+-------------------------------+ 
1024这就是一般MySQL系统默认的最大长度,如果你的bid串起来大于这个就会出问题 
解决办法 

1.在MySQL配置文件中加上 

group_concat_max_len = 102400 #你要的最大长度 

2.执行语句: 

mysql> SET GLOBAL group_concat_max_len=102400; 

再执行group_concat语句就不会出问题了

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn