我有一个验证码,例如我在数据库表中有一个:.Nag14I
如果我把它写成:nag14i
在下面的 mysql 查询中,我有一个输出:
$query = "SELECT * FROM captcha WHERE word = 'nag14i' AND captcha_time > '$expiration'";
print_r($query); //[num_rows] => 1
我的输出为:
word = Nag14I => [num_rows] => 1
word = nag14I => [num_rows] => 0
word = Nag14i => [num_rows] => 0
word = nag14i => [num_rows] => 0
如果通过mysql查询是大写还是小写,如何匹配所有字母?