Jump to content

How To Fetch An Array Of Column Names From A Table


chibineku
 Share

Recommended Posts

Title says it all really. If I had a table with unknown columns and I wanted to return a list of column names, how can I do it without selecting any particular row? I know I could just select a record and foreach through them, extracting the keys, but is there a way without actually extracting any particular record?

Link to comment
Share on other sites

SHOW columns IN `table`

SHOW is a sort of meta-SELECTor.

Edited by Synook
Link to comment
Share on other sites

спасибо!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...