pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andy Anderson <aanderson@amherst.edu>
To: PostgreSQLPHP <pgsql-php@postgresql.org>
Subject: Re: See postgre tables from PHP code
Date: Wed, 12 Nov 2008 08:16:34 -0500
Message-ID: <DD84163B-DCEF-4A07-9CF5-C14CB3E885B8@amherst.edu> (raw)
In-Reply-To: <001501c942e9$665772b0$3000a8c0@atenea>
References: <001501c942e9$665772b0$3000a8c0@atenea>

If your code below is literal, then try changing "dbaname" to  
"dbname"; otherwise it's not going to set the database properly and  
won't know where these tables are.

-- Andy

On Nov 9, 2008, at 11:04 PM, Félix Sánchez Rodríguez wrote:

> Hi everybody:
>
> I'm relatively new to PHP programming and I was recommended to use  
> PostgreSQL as the site's database. However I haven't able to see my  
> DB's tables from PHP. Here is my (very simple, I think) code:
>
> $pg = pg_connect("host=localhost port =5432 dbaname = ATM  
> user=postgres password = mypassword");
> pg_query($pg,"select nick,contrasenna,nombre,apellidos from  
> usuarios");
>
> Beside, I opened my PostgreSQL interface, called pgAdmin and run the  
> same query inside the ATM database and the error was the same:  
> "relation 'usuarios' was not found". It's like something else was  
> needed to access the DB tables.
>
>
> -- 
> Sent via pgsql-php mailing list (pgsql-php@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-php




view thread (5+ messages)

Message-ID: <DD84163B-DCEF-4A07-9CF5-C14CB3E885B8@amherst.edu>
Permalink:  ../DD84163B-DCEF-4A07-9CF5-C14CB3E885B8@amherst.edu/
Also on:    postgresql.org/message-id/DD84163B-DCEF-4A07-9CF5-C14CB3E885B8@amherst.edu

 · 

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: aanderson@amherst.edu
  Subject: Re: See postgre tables from PHP code
  In-Reply-To: <DD84163B-DCEF-4A07-9CF5-C14CB3E885B8@amherst.edu>
  References: <001501c942e9$665772b0$3000a8c0@atenea> <DD84163B-DCEF-4A07-9CF5-C14CB3E885B8@amherst.edu>

* 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