Re: Case-Sensitivity with PHP and MySQL
| From: | Plutarck | Date: | Thu, 12 Apr 2001 03:45:14 +0000 |
| Subject: | Re: Case-Sensitivity with PHP and MySQL | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-48240@lists.php.net to get a copy of this message | ||
I had a similar question about case-sensitivity, and I was told that MySQL
is automatically case-insensitive! But it depends on your version of MySQL.
Go to the mysql manual and look at chapter 20.16 "Case sensitivity in
searches".
In the newest versions of MySQL, all searches are case-insensitive by
default. To make them case-sensitive however, is a royal pain in the arse.
--
Plutarck
Should be working on something...
...but forgot what it was.
"midget2000x" <midget@elaris.com> wrote in message
news:01041122423701.19013@mullhawk.thewhiteroom.com...
>
> I am writing a PHP script that operates on a MySQL database that uses the
> e-mail address as the primary key. If the e-mail doesn't exist in the
database
> (when a form is submitted), I want to insert a new record. If it does, I
want
> to update the existing record.
>
> How can I make the query that checks if the e-mail exists
case-insensitive? I
> want to avoid users creating another record if they type in their e-mail
in a
> different case.
>
> Thanks!
>
> rory
>
> -----------
> providing the finest in midget technology
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>