MyBB Community Forums

Full Version: SQL Error: 1055 - Expression #6 of SELECT list is not in GROUP BY clause
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I get this error on a new 1.8.6. installation on the /usercp.php?action=usergroups page for every user (Administratior and registered user).
No custom user groups are created.


SQL Error:
    1055 - Expression #6 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'mybb.l.canmanagerequests' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
Query:
    SELECT g.title, g.gid, g.type, COUNT(DISTINCT u.uid) AS users, COUNT(DISTINCT j.rid) AS joinrequests, l.canmanagerequests, l.canmanagemembers, l.caninvitemembers FROM mybb_groupleaders l LEFT JOIN mybb_usergroups g ON(g.gid=l.gid) LEFT JOIN mybb_users u ON(((CONCAT(',', u.additionalgroups, ',') LIKE CONCAT('%,', g.gid, ',%')) OR u.usergroup = g.gid)) LEFT JOIN mybb_joinrequests j ON(j.gid=g.gid AND j.uid != 0) WHERE l.uid='1' GROUP BY l.gid 

PHP: 5.6.18
MySQL: 5.7.10
Already fixed on GitHub, will be shipped with MyBB 1.8.7: https://github.com/mybb/mybb/issues/2306. You can apply these changes to make it work now: https://github.com/Stefan-ST/mybb/commit...2433afe959