MySql GROUP_CONCAT does not work when exporting from phpmyadmin

When I test the query with group_concat , it works fine and displays the correct list with comma delimited string. However, when I then click Export at the bottom of the result set, I get error message #1630 - FUNCTION <databasename>.group_concat does not exist.

It seems that processing the link to group_concat considered as a user-defined function. Is there a way to properly name the function so that it can find it when exporting? I had no problems exporting before when you were not trying to use group_concat .

Here is the request:

 SELECT *, group_concat(distinct g.name) FROM `users` u left join usergroupassoc a on u.userid = a.userid left join usergroups g on a.usergroupid = g.usergroupid where u.enddate is null and g.enddate is null group by u.userid 
+6
source share
1 answer

group_concat uses the comma as the default delimiter, which may prevent phpmyadmin from correctly generating your export file.

Try specifying a comma as the group_concat delimiter:

 SELECT *, group_concat(distinct g.name SEPARATOR ';') FROM `users` u left join usergroupassoc a on u.userid = a.userid left join usergroups g on a.usergroupid = g.usergroupid where u.enddate is null and g.enddate is null group by u.userid; 
+1
source

Source: https://habr.com/ru/post/914355/


All Articles