Re: Finding the value of the COMMENT in a table column
| From: | David Robley | Date: | Mon, 20 Sep 2004 03:32:55 +0000 |
| Subject: | Re: Finding the value of the COMMENT in a table column | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-36269@lists.php.net to get a copy of this message | ||
On Sun, 19 Sep 2004 21:19, Ross Honniball wrote:
> Hi all,
>
> Anyone know how to access the optional COMMENT you can add to columns
> during table creation?
>
> eg.
>
> create table x (fldx char(1) COMMENT 'some comment', fldy char (1) COMMENT
> 'another comment')
>
> I want to 'get' the COMMENT field.
>
> I know it should be in the manual, but I can't find it.
>
> Thanks ... Ross
> .
> . Ross Honniball. JCU Bookshop Cairns, Qld, Australia.
SHOW TABLE STATUS LIKE 'pattern' or SHOW CREATE TABLE tablename will return
the table comment, along with other info - you'll have to parse it out of
the returned data. If there is a better way, I haven't found it yet :-0 Not
sure how this will work with column comments.
Cheers
--
David Robley
"May I introduce the family Stone?" Tom asked slyly.