Re: case-insensitive select?
| From: | Synthetic.Rage | Date: | Tue, 10 Oct 2000 18:22:25 +0000 |
| Subject: | Re: case-insensitive select? | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-3490@lists.php.net to get a copy of this message | ||
Have you verified that this works? This was one of the first things I tried
as a solution since it seemed logical, but MySQL just gives me an error on
LCASE and LOWER. Maybe it's my version (3.22.32), but my sysadmin doesnt
want to upgrade. ;)
Thanks though..
""Richard Allsebrook"" <richard.allsebrook@easysoft.com> wrote in message
news:NEBBJPGGOPOMAMHNOANNKEHDCBAA.richard.allsebrook@easysoft.com...
> SELECT field FROM table
> ORDER BY LCASE(field)
>
> or (depending on your DB)
>
> SELECT field FROM table
> ORDER BY LOWER(field)
>
>
> _____
>
> -----Original Message-----
> From: Synthetic.Rage [mailto:go@away.com]
> Sent: Tuesday, October 10, 2000 6:22 PM
> To: php-db@lists.php.net
> Subject: [PHP-DB] case-insensitive select?
>
>
> Hey Y'all;
>
> I have a VARCHAR field in my MySQL database that I've set with the BINARY
> attribute so that I can do a case-sensitive SELECT WHERE. However, I now
> want to do an ORDER BY on this field, and I'd like it to be
> case-insensitive. Any solution to this, either through a specific SELECT
> query, or some routine via PHP after the query has been returned? I'm
using
> PHP4 and MySQL 3.22.32.
>
> Thanks..