Subject Re: [firebird-php] Digest Number 271
Author Didier Gasser Morlay
Rob,

in that case you need to do a

Select * from test <---- your table_name here

instead of Select * from test as you indicate.

Alternatively, you may want to do a

Select text from test

as it is often a better strategy to name your fields in a select

Hope this helps

Didier

> Subject: Re: -204 Table unknown
>
>
> No what I meant was that I have created a Database with a table called
> test and in that table I have a field called text and I have already
> put data in it.
>
> Now I want to get the data out of this table with the select stuff and
> I want to do this with PHP. So I wanted to do some testing but I cant
> get the data out of it.
>
> I can connect over PHP with the Database but I am having some problems
> executing the select statement in PHP the same statement in ISQL works
> fine.
> I hope that you can help me now.
>
> Regards
>
> Rob
>
> --- In firebird-php@yahoogroups.com, "Didier Gasser-Morlay"
> <Didiergm@n...> wrote:
>
>>Robert,
>>probably a silly question but
>>
>> 1) I would have thought that Text was a reserved word anyway =>
>
> you might
>
>>not be able to create a table with that name
>>
>> 2) have you created a table in your database called "table_name" ?
>>
>>if not then look at the create table syntax where you define the
>
> fields etc...
>
>>If I am stating the obvious, then accept my apologies
>>
>>Didier
>>
>>
>>
>> Date: Mon, 28 Mar 2005 19:19:10 -0000
>>
>>> From: "nn33dl3" <nn33dl3@y...>
>>>Subject: -204 Table unknown
>>>
>>>Hi,
>>>
>>>I am very new to Firebird that's why I am using this example to
>>>connect to a Database with PHP but every time when I execute the
>>>Script I get the following Error message:
>>>
>>>Warning: ibase_query(): Dynamic SQL Error SQL error code = -204 Table
>>>unknown TEXT At line 1, column 16. in
>>>D:\Projekte\Firebird_php\test_con.php on line 7
>>>
>>>I have tried "table_name" but didn't work.
>>>
>>>Maybe someone can tell me what I am doing wrong here I am trying this
>>>on a Windows XP maschine with PHP 4.3 and Firebird 1.5.2 installed.
>>>
>>>Thanx in advance
>>>
>>>Robert
>>>
>>><?php
>>> $dbh = ibase_connect ('localhost:C:/TEST.GDB', 'SYSDBA',
>>>'pommes', 'ISO8859_1', '100', '1' ) ;
>>> $stmt = ' SELECT * FROM text ';
>>> $sth = ibase_query($dbh, $stmt);
>>> while ($row = ibase_fetch_object($sth)) {
>>> echo $row->email, "\n";
>>> }
>>> ibase_free_result($sth);
>>> ibase_close($dbh);
>>>?>
>>>
>
>
>
>
>
> ________________________________________________________________________