Subject Re: [firebird-support] How to display the table headers?
Author Alexandre Benson Smith
Joseph Oaks wrote:
> Nando, thanks,
>
> This did not work, it must be something that Fishbowl does with the db,
> I get
> the following error when I try to query this from PHP
> Dynamic SQL Error SQL error code = -204 Table unknown RDB unknown
> ISC error 336397208 in
> */opt/apache-2.0.59/htdocs/egroupware/test.php* on line *9*
>
> $stmt = "SELECT RDB$FIELD_NAME from RDB$RELATION_FIELDS where
> RDB$RELATION_NAME = 'SO' order by RDB$FIELD_POSITION";
>

did you forget that $ is a prefix for variables in php ?

php is trying to substitute $RELATION_FIELDS by it's variable value :-)

something like

SELECT RDB<content of $FIELD_NAME variable> from RDB<content of $RELATION_FIELDS variable> where
RDB<content of $RELATION_NAME variable> = 'SO' order by RDB<content of $FIELD_POSITION variable>

that is translated to:

SELECT RDB from RDB where
RDB = 'SO' order by RDB

:-)


see you !

--
Alexandre Benson Smith
Development
THOR Software e Comercial Ltda
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br