Computer Science Canada

SQL Statement Error =/

Author:  Balmung [ Tue Jul 01, 2008 11:57 pm ]
Post subject:  SQL Statement Error =/

I've searched for a Fix but I havn't been finding one and its getting annoying now

code:

SELECT m.city, l.approved, l.date_start, list.area
FROM members m
JOIN listings l
JOIN list
ON m.id = l.member_id
WHERE m.city = list.area
AND m.city != 'NULL'
AND l.approved = 'yes'
AND l.date_start >= CURDATE( )
GROUP BY m.city
ORDER BY m.city


I get:
code:
Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (latin1_general_ci,IMPLICIT) for operation '='


and if i change

WHERE m.city = list.area

too

WHERE m.city LIKE list.area

I get:
code:
Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (latin1_general_ci,IMPLICIT) for operation 'like'



So im confused, sorry if I put this in the wrong section dunno if it should be here or Web Development not Sure its sorta for bothish, normal DB Programming for a program and Web.

Author:  Tony [ Wed Jul 02, 2008 12:08 am ]
Post subject:  RE:SQL Statement Error =/

latin1_swedish_ci is an encoding of the table in the database. It looks like your two tables (members and listing ?) are encoded inconsistently. It's a problem with database setup/configuration (of the tables), not with your SQL statement.

Author:  Balmung [ Wed Jul 02, 2008 12:42 am ]
Post subject:  RE:SQL Statement Error =/

Ah, thanks I was stuck on that and i wasnt sure what was happening, thanks so much.


: