Subject | ibase_query question |
---|---|
Author | ke4dm |
Post date | 2007-10-05T12:56:49Z |
In order to learn how to use PHP (5.2.4) with Firebird, I have created
a table "entries" with four fields "id,title,content,date" in a
database blognew.fdb. I have entered four rows of data into the table.
Using Lester's tutorial as a guide, I wrote the following PHP script:
<?php
$dbh = ibase_connect('localhost:/opt/fbdata/blognew.fdb', 'webuser',
'webuser');
if (!$dbh)
{
echo "Error while connecting: ".ibase_errmsg();
exit();
}
$sth = ibase_query($dbh, "select * from entries");
while ($row = ibase_fetch_object($sth)) {
echo "$row->CONTENT";
}
ibase_close ($dbh);
?>
The connection apparently works, but the query fails with an error
code -204 "Table unknown ENTRIES". Any ideas on what I am doing wrong?
a table "entries" with four fields "id,title,content,date" in a
database blognew.fdb. I have entered four rows of data into the table.
Using Lester's tutorial as a guide, I wrote the following PHP script:
<?php
$dbh = ibase_connect('localhost:/opt/fbdata/blognew.fdb', 'webuser',
'webuser');
if (!$dbh)
{
echo "Error while connecting: ".ibase_errmsg();
exit();
}
$sth = ibase_query($dbh, "select * from entries");
while ($row = ibase_fetch_object($sth)) {
echo "$row->CONTENT";
}
ibase_close ($dbh);
?>
The connection apparently works, but the query fails with an error
code -204 "Table unknown ENTRIES". Any ideas on what I am doing wrong?