Re: [PHP] Sorting MySQL queries

2006-11-07 Thread Dotan Cohen
On 07/11/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: you really need to deal with this issue at the database design/data entry level. doing things on the sort to exclude (otherwise undefined) initial articles (as some have suggested) is very maintenance heavy as you have to update the sort

Re: [PHP] Sorting MySQL queries

2006-11-06 Thread tedd
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

Re: [PHP] Sorting MySQL queries

2006-11-06 Thread Curt Zirzow
On 11/5/06, Roman Neuhauser [EMAIL PROTECTED] wrote: If you used PostgreSQL I'd suggest a functional index and ordering on the function... Does MySQL have anything like this? CREATE FUNCTION fn(TEXT) RETURNS TEXT IMMUTABLE STRICT LANGUAGE SQL AS $$ SELECT

Re: [PHP] Sorting MySQL queries

2006-11-06 Thread Richard Lynch
On Sun, November 5, 2006 7:13 am, 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

Re: [PHP] Sorting MySQL queries

2006-11-06 Thread Dotan Cohen
On 06/11/06, Richard Lynch [EMAIL PROTECTED] wrote: On Sun, November 5, 2006 7:13 am, 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

Re: [PHP] Sorting MySQL queries

2006-11-06 Thread Børge Holen
On Monday 06 November 2006 08:15, clive wrote: Current code: $query = SELECT subject FROM table ORDER BY subject asc; $result = mysql_query($query); I dont seen any php code to do any sorting,just a mysql query, perhaps a mysql list or maybe you should try doing it in php yourself first.

Re: [PHP] Sorting MySQL queries

2006-11-05 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-11-05 15:13:19 +0200: 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

Re: [PHP] Sorting MySQL queries

2006-11-05 Thread clive
Current code: $query = SELECT subject FROM table ORDER BY subject asc; $result = mysql_query($query); I dont seen any php code to do any sorting,just a mysql query, perhaps a mysql list or maybe you should try doing it in php yourself first. Not that I know the answer, but mysql does have