Jump to content

[SOLVED] Username Case Sensitive


whiteboikyle

Recommended Posts

if you want to do this in PHP, case sensitive comparison can be done using strcmp(), just like in C.

 

if you want to do this in MySQL, then you need to convert the other field as binary to make it case sensitive, example:

 

SELECT 'aB' LIKE BINARY 'aB'; -- returns 1 which is true

SELECT 'aB' LIKE BINARY 'ab'; -- returns 0 which is false

 

is that what you mean?

I also learned that if you set your Collation to latin1_bin it will check it Case Sensitively.

teng84: that is not true xD it inputs it case sensitive so when you are comparing the data yes.. But, it wont check the 2 data's using mysql case sensitive unless you have your collation to that.. Thanks DarkWater again for all your help!!!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.