AndyB Posted June 2, 2006 Share Posted June 2, 2006 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? Link to comment https://forums.phpfreaks.com/topic/10994-case-sensitive-comparison/ Share on other sites More sharing options...
fenway Posted June 2, 2006 Share Posted June 2, 2006 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. Link to comment https://forums.phpfreaks.com/topic/10994-case-sensitive-comparison/#findComment-41074 Share on other sites More sharing options...
AndyB Posted June 2, 2006 Author Share Posted June 2, 2006 Binary is exactly what did the trick. Thanks. Link to comment https://forums.phpfreaks.com/topic/10994-case-sensitive-comparison/#findComment-41077 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.