Case sensitive selects in MySQL
There has been a couple of reasons recently that I needed to do a look up on a MySQL table using a case-sensitive Select statement. Its actually as easy as using "LIKE BINARY" instead of "LIKE" e.g.
ColdFISH is developed by Jason Delmore. Source code and license information available at coldfish.riaforge.org
SELECT username, password
FROM tablename
WHERE password LIKE BINARY 'SOmE PAssWOrD'
1SELECT username, password
2FROM tablename
3WHERE password LIKE BINARY 'SOmE PAssWOrD'
Obviously if you are on a CFML engine don't forget
<cfqueryparam cfsqltype="cf_sql_varchar" value="SOmE PAssWOrD" />