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?

Link to comment
Share on other sites

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!!!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.