Jump to content

Archived

This topic is now archived and is closed to further replies.

AndyB

Case-sensitive comparison

Recommended Posts

Nothing leapt out of the manual or a search at MySQLFreaks :(

MySQL version 4.0.27 Standard and I want to do a case-sensitive comparison in a database query between a user-entered string (albeit cleaned up) and a varchar field. = fails, LIKE fails, and STRCMP fails - unless I screwed up a simple query. How do I do a case-sensitive comparison?

Share this post


Link to post
Share on other sites
If I recall correctly, pre-4.1 you need to use the BINARY operator to get the case to "stick"; never even though of using strcmp.

Share this post


Link to post
Share on other sites
Binary is exactly what did the trick. Thanks.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.