Re: Ordering alphabetical in secondary select string

From: Date: Wed, 12 May 2004 09:26:29 +0000
Subject: Re: Ordering alphabetical in secondary select string
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-186077@lists.php.net to get a copy of this message
"R.G. Vervoort" <roy.vervoort@royvervoort.nl> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ ÓÌÅÄÕÀÝÅÅ: news:40a1d8dc$0$562$e4fe514c@news.xs4all.nl... > > > > > Does anyone have a suggestion how I can order a list with names in a > secondary select string. > > > > The first string selects a number of locations where people work > > > > From this string I get several id's form people (in the location table there > are no names but id's form the people table) that work on those locations > > > > No I make another select to get the name form the people table using the id > I got before. > > > > I would like to have the table ordered alphabetical by the name of the > people > > > > Since the number op people is very long is will be to slow working the other > way around (first selecting people and then looking for the location) > > > > Example: > > > > Location 1 Name A > > Name B > > Name C > > Location 3 Name D > > Name E > > Location 5 Name F > > Location 2 Name G > > Location 9 Name H > > Location 7 Name I > > > > > > > > ORDER BY name ASC

« previous php.general (#186077) next »