Skip site navigation (1) Skip section navigation (2)

See postgre tables from PHP code

From: Félix Sánchez Rodríguez <fesanch(at)ciego(dot)cult(dot)cu>
To: "PostgreSQLPHP" <pgsql-php(at)postgresql(dot)org>
Subject: See postgre tables from PHP code
Date: 2008-11-10 04:04:15
Message-ID: 001501c942e9$665772b0$3000a8c0@atenea (view raw or flat)
Thread:
Lists: pgsql-php
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. 



Responses

pgsql-php by date

Next:From: BrewDate: 2008-11-12 03:32:31
Subject: Re: See postgre tables from PHP code
Previous:From: Raymond O'DonnellDate: 2008-11-06 23:09:55
Subject: Re: apache+php+postgresql+WindowsXP

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group