Re: column names
| From: | Mauricio Junqueira | Date: | Thu, 05 Apr 2001 13:37:58 +0000 |
| Subject: | Re: column names | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-47269@lists.php.net to get a copy of this message | ||
Steve Werby wrote:
> "Tim Ward" <tim.ward@stivesdirect.com> wrote:
>> SHOW COLUMNS FROM tablename
>> is the MySQL query
>
> That works well from the MySQL commandline, but isn't as useful from
> within a PHP script if Mauricio wants to control the formatting of it,
> limit the
> fields displayed and use it within the logic of the PHP script. Depends
> what he needs to do. I still think mysql_field_name() / pg_fieldname()
> are the way to go, though Mauricio never mentioned which DBMS he's using.
>
> --
> Steve Werby
> President, Befriend Internet Services LLC
> http://www.befriend.com/
>
>
>
I am using interbase6....
By now , using this query over the system tables solved my problem:
SELECT RDB$FIELD_NAME
FROM RDB$RELATION_FIELDS
WHERE RDB$RELATION_NAME = 'mytable'
I need to do this way because the table might be empty and I'll not be
able to use ibase_field_info on each column returned by one query like
select * from mytable.