X-Original-To: pgsql-php@postgresql.org Received: from localhost (developer.postgresql.org [64.117.224.193]) by developer.postgresql.org (Postfix) with ESMTP id C78CD924CCA for ; Sat, 24 May 2003 17:58:07 -0400 (EDT) Received: from developer.postgresql.org ([64.117.224.193]) by localhost (developer.postgresql.org [64.117.224.193:10024]) (amavisd-new) with ESMTP id 93207-07 for ; Sat, 24 May 2003 17:58:06 -0400 (EDT) Received: from wolff.to (wolff.to [66.93.249.74]) by developer.postgresql.org (Postfix) with SMTP id BC91C924CB9 for ; Sat, 24 May 2003 17:58:05 -0400 (EDT) Received: (qmail 6635 invoked by uid 500); 24 May 2003 22:00:09 -0000 Date: Sat, 24 May 2003 17:00:09 -0500 From: Bruno Wolff III To: Chadwick Rolfs Cc: Lonnie VanZandt , "'scott.marlowe'" , pgsql-php@postgresql.org, pgsql-sql@postgresql.org Subject: Re: faster output from php and postgres Message-ID: <20030524220009.GA6260@wolff.to> Mail-Followup-To: Chadwick Rolfs , Lonnie VanZandt , "'scott.marlowe'" , pgsql-php@postgresql.org, pgsql-sql@postgresql.org References: <009601c32150$66a78220$113ea8c0@predictable> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.4i X-Virus-Scanned: by amavisd-new X-Archive-Number: 200305/40 X-Sequence-Number: 2045 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;