Page 1 of 1

PHP PostgreSQL

Posted: Fri Aug 06, 2010 5:53 am
by bryant_16
Hey guys,

I'm using php to access to my postgreSQL but am having problems in the Select statement.

Heres what I have.

Code: Select all

$testing = person;
$query = "SELECT * FROM " .$testing;
But it will return me this:

Warning: pg_query() [function.pg-query]: Query failed: ERROR: relation "person" does not exist LINE 1: SELECT * FROM Parks ^ in C:\xampp\htdocs\Test.php on line 29
Query failed: ERROR: relation "parks" does not exist LINE 1: SELECT * FROM Person^

person is a table inside my postgreSQL.

Re: PHP PostgreSQL

Posted: Sun Aug 08, 2010 12:11 am
by bryant_16
anyone has any ideas to this?

Re: PHP PostgreSQL

Posted: Sun Aug 08, 2010 12:39 pm
by VladSun
Is this the complete query you've typesd?

Re: PHP PostgreSQL

Posted: Sun Aug 08, 2010 12:49 pm
by bryant_16
yup.. thats the complete query