RE: [PHP-DB] case-insensitive select?
| From: | Richard Allsebrook | Date: | Tue, 10 Oct 2000 17:52:58 +0000 |
| Subject: | RE: [PHP-DB] case-insensitive select? | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-3486@lists.php.net to get a copy of this message | ||
SELECT field FROM table
ORDER BY LCASE(field)
or (depending on your DB)
SELECT field FROM table
ORDER BY LOWER(field)
_____
~ Richard Allsebrook ~
Applications Developer and Webmaster
Easysoft Limited, No3 The Embankment, Leeds, LS1 4BJ
http://www.easysoft.com <http://www.easysoft.com> - http://www.cinema.com
<http://www.cinema.com>
"A computer lets you make more mistakes faster than any invention in human
history - with the possible exceptions of handguns and tequila."
_____
-----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..
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
For additional commands, e-mail: php-db-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net