In a php/mysql application where people can registre, is it a good idea to strtolower the username then store in the database in order to not have problems in the future? because people are using DiFfeReNt cases and i’m afraid that will make conflict in some queries.
Thanks
It really doesn’t matter – MySQL is case insensitive unless you specify so Andy, andy and AnDy will all match.
The caveat is collation – however:
Beware, if you are using
latin1_general_csthecsstands for case sensitive, and all your queries will be case sensitive! Here’s some more info on charsets and collation.