Truncated result with MySQL GROUP_CONCAT function

MySQL function group_concat is a powerful tool to concat strings using a custom sperator  :

GROUP_CONCAT([DISTINCT] expr [,expr ...]
[ORDER BY {unsigned_integer | col_name | formula} [ASC | DESC] [,col ...]]
[SEPARATOR str_val])

But sometimes the execution result may be truncated because of mysql default setting, so in this case "group_concat_max_len" haveto be changed to a bigger value

SET [GLOBAL | SESSION] group_concat_max_len = val;

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

Mollom CAPTCHA (play audio CAPTCHA)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated.