Can I use mysql column comments as labels for the input fields in a form

I was wondering if I can use the comment columns as reusable data to populate the labels in a html form? if so how would I call these comments in php?

you would run an sql query like this –

SELECT column_name , column_comment FROM information_schema.columns WHERE table_schema = 'test' -- replace with your database name AND table_name = 'xhistory' -- replace with your table name ORDER BY ordinal_position -- returns columns in the order defined in the table

that is very nice!!! thank you very much…

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.