Re: Ordering alphabetical in secondary select string
| From: | R.G. Vervoort | Date: | Wed, 12 May 2004 09:51:34 +0000 |
| Subject: | Re: Ordering alphabetical in secondary select string | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-186059@lists.php.net to get a copy of this message | ||
it are different table and the first table does not contain names, onlu the
id form names.
Ordering ASC woll not work because it is not in the first query
thank for thinking with me anyway
"Dennis Biletsky" <ufafa@ua.fm> schreef in bericht
news:c7sqfu$2m6o$1@fortress.intercom.net.ua...
>
> "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
>
>