Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 SQL Statement Error =/
Index -> General Programming
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Balmung




PostPosted: 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.
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: 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.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Balmung




PostPosted: 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.
Display posts from previous:   
   Index -> General Programming
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: