質問

Hey guys i got an interesting situation!

In Turkish language we have ı,ç,ğ,ö,ş and uppercase of them. I also have a huge table of threads with turkish titles.

like in this example :

mysql> select id,title from xr_threads where title = 'birinci';
+--------+---------+
| id     | title   |
+--------+---------+
|     67 | birinci |
|  34635 | bırıncı |
| 322727 | birinçi |
+--------+---------+
3 rows in set

Query in my function always grabs the first one. However if I run this query again with title = 'bırıncı' mysql grabs these 3 results again. I want mysql to only get 34635 id but no matter what I typed it always gets these 3 result. Why it is not getting the matched one?

役に立ちましたか?

解決

Try:

mysql> select id,title from xr_threads where title = BINARY 'birinci';

More info about the BINARY operator use on the MySQL doc page http://dev.mysql.com/doc/refman/5.0/en/charset-binary-op.html

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top