SQL Statement Error =/
Author |
Message |
Balmung
![](http://compsci.ca/v3/uploads/user_avatars/21997371145c9d39cee992.jpg)
|
Posted: 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. |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Tony
![](http://wiki.compsci.ca/images/f/f4/OniTony.gif)
|
Posted: 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. |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
![](images/spacer.gif) |
Balmung
![](http://compsci.ca/v3/uploads/user_avatars/21997371145c9d39cee992.jpg)
|
Posted: 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. |
|
|
|
|
![](images/spacer.gif) |
|
|