Many people will think this is a duplicate question and answers to such question is already given.But I have a different problem, here I don't know the number of columns and name of columns!
I have a text input type in html in which a user can directly manipulate database. User can query any table in database. All tables have different column names and number of columns. And i can't use 'describe' and 'show column' sql statement since name of the column is unknown.
All the answers to this question considers programmer already know column name and number of columns in table.
So the question is:
how to get number of columns in table?
how to get column names of table to display it in table heading tag?