Re: [PHP] faster output from php and postgres

Поиск
Список
Период
Сортировка
Искать

Re: [PHP] faster output from php and postgres

От:
Bruno Wolff III <bruno@wolff.to>
Дата:
On Sat, May 24, 2003 at 13:02:29 -0400,
  Chadwick Rolfs  wrote:
> As a person with the same problem, I would love to know how to do this.
> The concept escapes me, but maybe these lists could help with novice
> sqlers.
> 
> If there are multiple authors per publication (my case), and each author
> needs to be selected and displayed, how can that be done via a join?
> 
> One would need to query for all authors with each publication.

You would do something like:
select pub.pubname, auth.authname
  from pub, auth, pub_auth
  where
    pub.pubid = pub_auth.pubid and
    auth.authid = pub_auth.authid
  order by pub.pubname, auth.authname;
FAQ