View Single Post
Author Message
heavyisgps
Member
Join Date: Aug 2018
Old 09-04-2019 , 16:34   [SQL Error] (1267) Illegal mix of collations (utf8mb4_general_ci,IMPLICIT) [solved]
Reply With Quote #1

This is the error when attempting to view the Teams&Actions page of a player.

(1267) Illegal mix of collations (utf8mb4_general_ci,IMPLICIT) and (utf8mb4_unicode_ci,IMPLICIT) for operation '='

The attempted SQL code

Code:
		SELECT
			IFNULL(hlstats_Roles.name, hlstats_Events_ChangeRole.role) AS name,
			IFNULL(hlstats_Roles.code, hlstats_Events_ChangeRole.role) AS code,
			COUNT(hlstats_Events_ChangeRole.id) AS rolecount,
			ROUND(COUNT(hlstats_Events_ChangeRole.id) / IF(110 = 0, 1, 110) * 100, 2) AS percent,
			hlstats_Frags_as_res.killsTotal,
			hlstats_Frags_as_res.deathsTotal,
			ROUND(hlstats_Frags_as_res.killsTotal / IF(hlstats_Frags_as_res.deathsTotal = 0, 1, hlstats_Frags_as_res.deathsTotal), 2) AS kpd
		FROM
			hlstats_Events_ChangeRole
		LEFT JOIN
			hlstats_Roles
		ON
			hlstats_Events_ChangeRole.role = hlstats_Roles.code
		LEFT JOIN
			hlstats_Frags_as_res
		ON
			hlstats_Frags_as_res.role = hlstats_Events_ChangeRole.role
		WHERE
			hlstats_Events_ChangeRole.playerId = 137
			AND
			(
				hidden <> '1'
				OR hidden IS NULL
			)
			AND hlstats_Roles.game = 'tf'
		GROUP BY
			hlstats_Events_ChangeRole.role
		ORDER BY
			rolecount desc,
			name desc
Any ideas on how to fix this? I searched the forum and couldn't find anything on this particular error.

I've looked over the tables and I can't find any table that has utf8mb4_general_ci, everyone has utf8mb4_unicode_ci as far as I can tell.

Last edited by heavyisgps; 09-21-2019 at 20:12.
heavyisgps is offline