SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Guru
    Join Date
    Sep 2008
    Posts
    977
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    querying table comment

    Hi,

    I have a table set up as shown below. I want to return the comments data four output to the web page.


    Code mysql:
    create table table_name
    ( id    INT    NOT NULL
    , col_name  varchar(32) NOT NULL  COMMENT 'comments here'
    , primary key (id)
    ) engine=innodb default charset=latin1;

    How do I get them. I checked the docs but, couldn't see anything.


    bazz

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,161
    Mentioned
    190 Post(s)
    Tagged
    2 Thread(s)
    AFAIK, the column comments are meant to be informative for the db tech, not a type of "co-column", and therefore not accessable via a SELECT query -- but I could be wrong. Perhaps you should consider adding a comments column to the table? If you are looking for an easy way to see them maybe use a tool like the MySQL Query Browser?
    Or maybe you could parse the results from a SHOW CREATE TABLE query?

  3. #3
    SitePoint Guru
    Join Date
    Sep 2008
    Posts
    977
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Now why didn't I think of that ????

    Good explantion mittineague. Thanks for that.

    An additional column is what I shall do.

    bazz


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •