alex
alex

Reputation: 113

Mysql, pivot table working in sqlfiddle but not working in phpmyadmin

I had recently posted a question that was miraculously answered in regards to pivoting a mysql result. Although it was solved and worked in the accompanied sqlfiddle, I can't seem to get the query working when I bring it back onto my database (in phpmyadmin). I checked the versions, and the fiddle is version 5.1.61 and my MySql is 5.1.66-cll. Any thoughts? Here is the fiddle: http://sqlfiddle.com/#!8/59727/1 thank you in advnace for any help.

Upvotes: 1

Views: 899

Answers (1)

Taryn
Taryn

Reputation: 247850

Based on your comment and previous question about pivoting. It sound like you need to increase the length of the GROUP_CONCAT() function.

The default length is 1024.

To change the length you will want to use the following before your code to generate the dynamic sql query:

SET [GLOBAL | SESSION] group_concat_max_len = val;

You can either change the GLOBAL or SESSION length and replace the val with the length that you need.

Upvotes: 2

Related Questions