pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: pknoob <pknoob@noos.fr>
To: pgsql-php@postgresql.org
Subject: Inheritance issues displaying tables
Date: Sat, 31 May 2003 22:33:54 +0200
Message-ID: <200305312233.54808.pknoob@noos.fr> (raw)

I have three tables that look like this:

CREATE TABLE episodes(
id int, 
 name       text,
 )
);

CREATE TABLE p2p(
  p2p varchar
) INHERITS (episodes);


CREATE TABLE irc(
  server_name varchar
) INHERITS (episodes);

When I try :
$squery="SELECT * FROM episodeirc,episodep2p";
$squery=pg_query($squery);
while($row=pg_fetch_array($squery,NULL,PGSQL_ASSOC))
{
echo "      <td><b><a href=\"\">" . $row["name"] . "</b></td>
 		<td><b><a href=\"\">" . $row["id"] . "</b></td>
		  <td><b><a href=\"\">" . $row["p2p"] . "</b></td>
		  <td><b><a href=\"\">" . $row["server_name"] . "</b></td>";}

the problem is that it  prints results from the episodep2p table only. how can 
I make it print results from both tables?



Message-ID: <200305312233.54808.pknoob@noos.fr>
Permalink:  ../200305312233.54808.pknoob@noos.fr/
Also on:    postgresql.org/message-id/200305312233.54808.pknoob@noos.fr

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: pknoob@noos.fr
  Subject: Re: Inheritance issues displaying tables
  In-Reply-To: <200305312233.54808.pknoob@noos.fr>
  References: <200305312233.54808.pknoob@noos.fr>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox