Reputation: 1911
I'am trying to SELECT a cloumn in the table which contains only vowels. It works fine till I try to select entries with german umlauts (special chars like ä,ö,ü), then the query makes no difference between u<->ü, o<->ö, a<->ä
SELECT vowels
FROM words
WHERE vowels LIKE 'ü'
// this also selects all entries with simple 'u'
Collation of the database is UTF8, document is formatted in UTF8, I'am using $mysqli->set_charset("utf8");
Any ideas how to get that working? Thanks!
Upvotes: 0
Views: 724
Reputation: 3981
you can use COLLATE
to change the collation on the fly
SELECT vowels COLLATE utf8_bin as vowel
FROM words
WHERE vowel LIKE 'ü'
not tested
Upvotes: 1