another illegal mix mysql error

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

another illegal mix mysql error

Post by Burrito »

I am getting another one of these type errors:
#1271 - Illegal mix of collations for operation ' IN '
here is my sql query....it's kind of gnarly:

Code: Select all

SELECT * 
FROM lp_files
WHERE id
IN (


SELECT fileid
FROM lp_gradelevels
WHERE grlevel
IN (
'1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13'
)
)
AND (
filetype
IN (
'image'
)
)
AND id
IN (

SELECT fileid
FROM lp_subjects
WHERE subject
IN (
'foreign', 'health', 'math', 'reading', 'socialstudies', 'science', 'study', 'technology'
)
)
AND id
IN (

SELECT fileid
FROM lp_topics
WHERE topic
IN (
'spanish', 'chinese', 'japanese', 'french', 'german', 'physed', 'nutrition', 'geometry', 'prea', 'algebra', 'prec', 'cal', 'reading', 'writing', 'spelling', 'phonics', 'ushistory', 'worldhistory', 'geography', 'economics', 'civics', 'biology', 'chemistry', 'physics', 'earth', 'life', 'space', 'notetaking', 'organization', 'timeman', 'skills', 'applications'
)
)
AND title LIKE '%'
I've tried switching the fields that are involved with the "IN" operator to utf_unicode_ci and that didn't help...instead I got another error that said I was trying to mix latin with unicode and that I should go eat eggs and bacon...

any ideas here?
Post Reply