Fun With Collations

Posted by Stuart Herbert @ 10:51 PM, Wed 11 Jan 06

Filed under: PHP

5 Comments

I’ve spent much of this evening looking into the cause of this error:

Illegal mix of collations (latin1_swedish_ci,COERCIBLE) and (utf8_general_ci,IMPLICIT) for operation ‘UNION’

whilst hacking on SugarCRM v4, running with PHP 4.4.1 and MySQL-5.0.17, all running on Gentoo Linux.

The solution I found for tonight was to ensure that the PHP connection to MySQL, and the database being used, are using the same collation.

If you’d like to know more about this problem, please read on. (Blog syndication site readers will find the rest of this article on my blog page).

5 comments »

Calendar

January 2006
S M T W T F S
« Dec   Feb »
1234567
891011121314
15161718192021
22232425262728
293031