Illegal mix of collations in MySQL even with Collate and Binary Usage

mysql

Solution

You can cast on the fly, which is slow. On the long view, you should use integers for joins.

INNER JOIN
Agent ON (Land.ListingAgentID = Agent.AgentID COLLATE utf8_general_ci )

Great answer and explanation here: Troubleshooting "Illegal mix of collations" error in mysql

Problem

Using this stack question here, I tried to utilize collate and binary and am still getting the following error: Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation '=' Here is my MySQL query. Is there anyway to solve this within the query? I do not have access to alter the database or table, only to query it with SELECT. ``` SELECT SQL_CALC_FOUND_ROWS Land.ListingAgentID, Land.StreetNumber, Land.PostalCode, Agent.FirstName, Agent.LastName, Agent.Email FROM Land INNER JOIN Agent ON (Land.ListingAgentID = Agent.AgentID) WHERE ListingID = `$MLNumber`; ```

Original source

Related problems