PHP PostgreSQL

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
bryant_16
Forum Newbie
Posts: 3
Joined: Fri Aug 06, 2010 5:46 am

PHP PostgreSQL

Post 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.
bryant_16
Forum Newbie
Posts: 3
Joined: Fri Aug 06, 2010 5:46 am

Re: PHP PostgreSQL

Post by bryant_16 »

anyone has any ideas to this?
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: PHP PostgreSQL

Post by VladSun »

Is this the complete query you've typesd?
There are 10 types of people in this world, those who understand binary and those who don't
bryant_16
Forum Newbie
Posts: 3
Joined: Fri Aug 06, 2010 5:46 am

Re: PHP PostgreSQL

Post by bryant_16 »

yup.. thats the complete query
Post Reply