I have a capcha code for example i have in database table it as:Nag14I .if i put it as:nag14i in following mysql query i have a output:
$query = "SELECT * FROM captcha WHERE word = 'nag14i' AND captcha_time > '$expiration'";
print_r($query); //[num_rows] => 1
I have in out put as:
word = Nag14I => [num_rows] => 1
word = nag14I => [num_rows] => 0
word = Nag14i => [num_rows] => 0
word = nag14i => [num_rows] => 0
How can match all letters if is uppercase or lowercase by mysql query?
MySQL isn’t case-sensitive by default, in order to make a query case-sensitive try the BINARY operator: