Sorting MySQL queries

2006-11-06 Thread Dotan Cohen
I have a list of subjects, such as Linux, Open Source, and the World Wide Web. The subjects are stored in MySQL and being retrieved via php. I currently organize them alphabetically with MySQL's ORDER BY ASC argument, however, if there is a preceding the or a then that is considered as part of

Re: Sorting MySQL queries

2006-11-06 Thread Christian Hammers
On 2006-11-06 Dotan Cohen wrote: I have a list of subjects, such as Linux, Open Source, and the World Wide Web. The subjects are stored in MySQL and being retrieved via php. I currently organize them alphabetically with MySQL's ORDER BY ASC argument, however, if there is a preceding the or

Re: Sorting MySQL queries

2006-11-06 Thread Dotan Cohen
On 06/11/06, Christian Hammers [EMAIL PROTECTED] wrote: On 2006-11-06 Dotan Cohen wrote: I have a list of subjects, such as Linux, Open Source, and the World Wide Web. The subjects are stored in MySQL and being retrieved via php. I currently organize them alphabetically with MySQL's ORDER BY

Re: Sorting MySQL queries

2006-11-06 Thread Christian Hammers
On 2006-11-06 Dotan Cohen wrote: Make a second column that only contains ALTER TABLE table ADD cooked_subject; UPDATE table SET cooked_subject = ereg_replace('^(a|the) ', '', subject); (I don't know how the regular expression function was called exactly but you get the idea)