I have a query that uses:
t3.`value` LIKE "%someval%" COLLATE utf8_general_ci
I load the page in my browser and get this error printed to the screen:
COLLATION 'utf8_general_ci' is not valid for CHARACTER SET 'latin1'
The query is also echoed to the page. And if I copy and paste the outputted query into a phpMyAdmin SQL window, it runs fine, producing the expected result.
I had a previous problem where PHP could not use LOAD DATA INFILE. I wonder if this is a similar type of problem. But I can't see how it would be.
This is running on an Ubuntu Server 10.04 MySQL Apache PHP stack.