HI all,
Im having a heck of a time here ...
Im running PostgreSQL 8.1 on windows XP.
I have created a new table in an existing database. The existing database
has a few schemas already built and some tables in these schemas.
I have sucessfully created a new table in a schema known as "st". I can view
the contents of my database and see that this table exists. However when I
attempt to connect to it via php, I get the following error:
Warning: pg_query(): Query failed: ERROR: relation "st.iam" does not exist
in D:\ms4w\Apache\htdocs\postgres\justconnect.php on line 8
There was an error! ERROR: relation "st.iam" does not exist
end script
When I change my query statement to use a differnt table in the same schema,
it connects without problem.
This is the php code Im running:
<?php
echo 'start script <br>';
pg_connect("dbname=playdb user=postgres password=xxxxx") or die("Couldn't
Connect: ".pg_last_error());
//$query = "SELECT * from st.dictionnary"; //***** this line works
$query = "SELECT * from st.IAM"; //***** this line wont work
$query = pg_query($query);
if($query)
echo "got it!";
else{
echo "There was an error! ".pg_last_error();
}
echo '<br> end script <br>';
?>
Can anyone suggest a reason why this may be happening? Perhaps Ive missed
something important while creating the table?
Thanks
Jeremy