I have two arrays. Each is being pulled from MySQL via the following;
$query ="SELECT country,";
$query.="GROUP_CONCAT(report) AS reports, ";
$query.="GROUP_CONCAT(topic) AS topics, ";
$query.="FROM reports GROUP BY country";
So, it is giving me two strings like this:
reports[$i] = 2011-05-11 A,2011-05-11 B,2011-05-11 C
topics[$i] = A,B,C
And it is working just fine, however, when the reports string is getting too long, MySQL just truncates it, and then I am throwing
Warning: array_multisort(): Array sizes are inconsistent
Becuse I am exploding the string down the line.
Obviously this is ruining my program. But I don’t know what to do, I am kind of in a crisis, because my boss said he was going to have the whole company start to use it. How can I make MySQL not truncate results?
Set group_concat_max_len to higher value.
Personally, I would rewrite code not to use group_concat function, but retreive all records instead.