2011-09-26, 02:11 PM
For my social groups plugin, one of the queries it runs on groups.php is
This works fine for me on my website, but some people it will trigger the following error message:
What can I alter the query to so it will work with all SQL versions or is there even just a better way to write the query? I already have it use the TABLE_PREFIX variable since not everyone will use mybb_.
SELECT g.*, u.*, ug.gid, ug.namestyle FROM mybb_socialgroups g LEFT JOIN mybb_users u ON (g.uid=u.uid) LEFT JOIN mybb_usergroups ug ON (u.displaygroup=ug.gid) WHERE g.leader=u.username
This works fine for me on my website, but some people it will trigger the following error message:
Quote:MyBB has experienced an internal SQL error and cannot continue.
SQL Error:
1267 - Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation '='
What can I alter the query to so it will work with all SQL versions or is there even just a better way to write the query? I already have it use the TABLE_PREFIX variable since not everyone will use mybb_.