Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Mysql: Order by Replace ()
March 18, 2007, 6:50 pm
rate this thread
select that ignored "The " in a field:
ORDER BY REPLACE(kennel_name,'The ','')
and it works fine.
I did check the mysql documentation site, but couldn't find this
use of replace.
What I want to do now is ignore "The " and "A " in a select, ie:
replace both "The " and "A " with "".
What would be the correct syntax ?
Re: Mysql: Order by Replace ()
ORDER BY REPLACE(REPLACE(kennel_name,'The ',''),'A ','')
You might also want to include "An " on your list.
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux
* = I'm getting there!