Issue with group_concat() in Laravel 5

4.2k views Asked by At

I am using group_concat() in my Laravel 5 model's Query. In this regard I use this statement.

DB::statement('SET GLOBAL group_concat_max_len = 1000000');

It is working fine in Locally but it not working in Live online server.

Could anyone say where is the problem ??

1

There are 1 answers

6
Dan Belden On BEST ANSWER

A few further questions/answers may help us help you:

  • Does your hosting provider enable modification of global variables?
  • Does your user permissions have the "SET" privilege?
  • Is the query throwing an error of any kind in your non-local environment?

A better check would be to see if the transaction has processed successfully using a sub-sequent check request on the database, because if you have set it globally it should work for all sessions, even ones not executed by your code.

SHOW VARIABLES LIKE 'group%';

Should indicate the current group concat max length configured.

Goodluck.