lc21 Posted July 15, 2007 Share Posted July 15, 2007 Hi, is MySQL case sensitive for example in the database if I had the name Smith for a surname and a search was performed for the surname 'smith' without a capital S would this still be found? Thank you. Quote Link to comment https://forums.phpfreaks.com/topic/60095-solved-case-sensitive/ Share on other sites More sharing options...
Oldiesmann Posted July 15, 2007 Share Posted July 15, 2007 MySQL is not case-sensitive, so yes, it will still get found no matter how they type it. Quote Link to comment https://forums.phpfreaks.com/topic/60095-solved-case-sensitive/#findComment-298925 Share on other sites More sharing options...
AndyB Posted July 15, 2007 Share Posted July 15, 2007 In case you need to know ... If you want users to type in Smith and NOT find smith, then use the WHERE binary $name = ... approach. If you want to find and display 'Smith' even when they enter smith, convert their input using ucfirst() and run a normal select on the db Quote Link to comment https://forums.phpfreaks.com/topic/60095-solved-case-sensitive/#findComment-298958 Share on other sites More sharing options...
lc21 Posted July 15, 2007 Author Share Posted July 15, 2007 Excellent advice thanks guys. Quote Link to comment https://forums.phpfreaks.com/topic/60095-solved-case-sensitive/#findComment-298994 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.