Re: Sorting MySQL queries
| From: | tedd | Date: | Mon, 06 Nov 2006 14:32:18 +0000 |
| Subject: | Re: Sorting MySQL queries | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-244256@lists.php.net to get a copy of this message | ||
At 3:13 PM +0200 11/5/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 a database and being retrieved via php. I currently organize them alphabetically with SQL's ORDER BY ASC argument, however, if there is a preceding "the " or "a " then that is considered as part of the alphabetical order. Thus, all the subjects starting with "the " are grouped together, as are the subjects starting with "a ". How can I order by ascending, without taking the preceding "the " or "a " into account? Thanks in advance. Dotan CohenDotan: In your table, set up a sort field. That way there will be no interpolation as to what you want. tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com