Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Illegal mix of collations
  • Hi,

    When I am passing a segment value (containing the UTF-8 string) to the query condition, I am getting the following error message:

    Fuel\Core\Database_Exception [ Error ]:
    SQLSTATE[HY000]: General error: 1267 Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '=' with query: "SELECT `id` FROM main.user WHERE `flash` = 'kło'"

    Where is the problem? How can I fix that so it would support the  latn1 encoding as well? I don't want to change the collation type in MySQL because its fine. There was no problem running such query with PDO.

    Regards
  • See http://dev.mysql.com/doc/refman/5.6/en/charset-collation-expressions.html

    This suggests that the collating sequence of the database is different from that off the table, causing a collations mix, which MySQL can't handle.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion