'm working on an PHP script that checks some values to the ones in the database. So far I thought it worked right, but I found an problem.
The query isn't looking for the specific characters.
So if I use this query:
SELECT *
FROM `facilitydb_login`
WHERE
facilitydb_login.`password` = 'PASS'
I want the result, because the password is PASS. But if you fill in pass (lowercase) the same entry is returned.
How can I make it case sensitive?
解决方案
you should use case sensitive collation, for example
SELECT *
FROM `facilitydb_login`
WHERE facilitydb_login.`password` collate latin1_general_cs = 'PASS'
CS in the name means that it's Case Sensitive