I have a table in which i need to sort the column names.
NOT sort by column names.....sort the COLUMN NAMES.
since it is easy to sort the records.....is there any way by which you can convert column into rows and rows into columns.
Jump to Post
To the best of my knowledge you cannot do this in SQL or MySQL, for that matter.
If you have access to PHP, you can read all column names in an array with mysql_field_name() and then sort and traverse the array.
Also have a look into the INFORMATION_SCHEMA …
All 3 Replies
Be a part of the DaniWeb community
We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.