Skip to Main Content

Using Column Comments instead of Column Title

User_L3HE5Jan 23 2021

I have a form on my website that saves data to the database. The fields on the form are named "colour" "shape" "cost". In the database, these form field titles are converted to shortnames by the script. So in the database, the same column names are "mcq1" "mcq2" "mcq3". Each one of the columns in the database have comments in the schema, which contain the actual column name (colour, shape, cost). The question is that when i query the database to show in a table on my website, the table column names show as the mcq1, mcq2, mcq3 names. There are quite a few form fields and i really dont want to use "AS" to rename every column name separately.
Is there a way of fetching the actual column form element names from the schema comment table instead of the short names for the table headers? I cannot find any reference to this type of query. Thankyou in advance

Comments
Post Details
Added on Jan 23 2021
4 comments
94 views