sungpeng Posted April 23, 2009 Share Posted April 23, 2009 $variable="A"; $sql = "SELECT * FROM listings WHERE address LIKE '%$variable%'"; $result = mysql_query($sql, $conn); Check can php mysql search the big letter and ignored the small letter "a"? Quote Link to comment https://forums.phpfreaks.com/topic/155315-solved-search-for-big-letter-and-ignore-the-small-letter/ Share on other sites More sharing options...
Daniel0 Posted April 23, 2009 Share Posted April 23, 2009 You need to set the collation to a case-sensitive one. E.g. utf8_general_cs. Quote Link to comment https://forums.phpfreaks.com/topic/155315-solved-search-for-big-letter-and-ignore-the-small-letter/#findComment-817127 Share on other sites More sharing options...
sungpeng Posted April 23, 2009 Author Share Posted April 23, 2009 set collation? Quote Link to comment https://forums.phpfreaks.com/topic/155315-solved-search-for-big-letter-and-ignore-the-small-letter/#findComment-817162 Share on other sites More sharing options...
sungpeng Posted April 23, 2009 Author Share Posted April 23, 2009 set utf8_general_ci, there is no utf8_general_cs Quote Link to comment https://forums.phpfreaks.com/topic/155315-solved-search-for-big-letter-and-ignore-the-small-letter/#findComment-817165 Share on other sites More sharing options...
sungpeng Posted April 23, 2009 Author Share Posted April 23, 2009 ok thank Quote Link to comment https://forums.phpfreaks.com/topic/155315-solved-search-for-big-letter-and-ignore-the-small-letter/#findComment-817167 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.