From: | Andy Anderson <aanderson(at)amherst(dot)edu> |
---|---|
To: | PostgreSQLPHP <pgsql-php(at)postgresql(dot)org> |
Subject: | Re: See postgre tables from PHP code |
Date: | 2008-11-12 13:16:34 |
Message-ID: | DD84163B-DCEF-4A07-9CF5-C14CB3E885B8@amherst.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-php |
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(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-php
From | Date | Subject | |
---|---|---|---|
Next Message | V S P | 2008-11-16 02:45:30 | [Q] PDO use to bind arrays for insert |
Previous Message | Raymond O'Donnell | 2008-11-12 09:34:31 | Re: See postgre tables from PHP code |