On Fri, 21 Sep 2001 14:28:52 -0400, [EMAIL PROTECTED] (Jason Stechschulte)

>On Fri, Sep 21, 2001 at 05:02:14PM +0100, Denny Suvanto wrote:
>> The script is just fine until I notice that the
>> username is case insensitive. So, if a member has a
>> username "andy" he can log in using 
>> "andy", "Andy", "aNdY", "andY", and so on. I also
>> notice that I can't enter a new member with username
>> "Andy", "anDY", and so on as they will duplicate the
>> existing "andy". Is this the natural behaviour of
>> MySQL or is there anyway to make it case sensitive?
>> I'm using PHP 4.0.6 & MySQL 3.23.39.
>You have to make the column case sensitive, binary will accomplish this.
>Something like:
>username varchar(20) binary

Another way to tackle the problem is to store the data into field in a set case
by running strtoupper or strtolower on the data before you store it or retrieve
it.  It will also likely require less CPU power than running a fuzzy regexp
based search.

- Dave

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to