This is a discussion on php cant see new table!! within the pgsql Novice forums, part of the PostgreSQL category; --> HI all, Im having a heck of a time here ... Im running PostgreSQL 8.1 on windows XP. I ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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 ---------------------------(end of broadcast)--------------------------- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq |
| ||||
| On Fri, Feb 17, 2006 at 10:55:10AM -0500, Sears, Jeremy wrote: > 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 Is the table name st.iam or st."IAM"? If you don't understand the difference then see the section about quoted identifiers in the documentation: http://www.postgresql.org/docs/8.1/i...AX-IDENTIFIERS -- Michael Fuhr ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster |