Question : get mysql field comments

Hi there,
I would like to attach an attribute to each field of my sql table. The only way i figured out to do it is to put that attribute in the comments of the field. But how can i retrieve it later on?

What i want to do exactly is that in php i want to take all the fields (show table status) and then if the comment for the field is 1, show the title of the field.

Answer : get mysql field comments

I prefer this way...  

1:
2:
3:
4:
SELECT COLUMN_COMMENT
FROM information_schema.COLUMNS
WHERE TABLE_SCHEMA = 'DBNAME'
  AND TABLE_NAME = 'tableName';
Open in New Window Select All
Random Solutions  
 
programming4us programming4us