moisesbr Posted August 18, 2013 Share Posted August 18, 2013 Hi How to ignore upper/lower case why searching ? e.g.: Locate a name in database where search term = two first letters of string"MA" results Mark ou mark or "ma" results Mark ou mark Also, do I need to trim A string as in some languages if user mistype a space: " MA" Moises Link to comment https://forums.phpfreaks.com/topic/281302-upperlower-case-and-other-strings-treatment/ Share on other sites More sharing options...
requinix Posted August 18, 2013 Share Posted August 18, 2013 What's the collation of the field you're searching on? If you don't know, what does SHOW CREATE TABLE output for it? Link to comment https://forums.phpfreaks.com/topic/281302-upperlower-case-and-other-strings-treatment/#findComment-1445613 Share on other sites More sharing options...
moisesbr Posted August 18, 2013 Author Share Posted August 18, 2013 What's the collation of the field you're searching on? If you don't know, what does SHOW CREATE TABLE output for it? Hi It's: utf8_general_cl Link to comment https://forums.phpfreaks.com/topic/281302-upperlower-case-and-other-strings-treatment/#findComment-1445614 Share on other sites More sharing options...
requinix Posted August 19, 2013 Share Posted August 19, 2013 Then I don't see why it wouldn't be searching case-insensitively already. The space probably matters - strip it out for good measure. Link to comment https://forums.phpfreaks.com/topic/281302-upperlower-case-and-other-strings-treatment/#findComment-1445720 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.