Is there a way to grab the columns name of a table in mysql? using php
相关问题
- Views base64 encoded blob in HTML with PHP
- Laravel Option Select - Default Issue
- SQL join to get the cartesian product of 2 columns
- sql execution latency when assign to a variable
- Difference between Types.INTEGER and Types.NULL in
It's also interesting to note that you can use
EXPLAIN table_name
which is synonymous withDESCRIBE table_name
andSHOW COLUMNS FROM table_name
although EXPLAIN is more commonly used to obtain information about the query execution plan.Look into:
You can use DESCRIBE:
Or in newer versions you can use INFORMATION_SCHEMA:
Or you can use SHOW COLUMNS:
you can get the entire table structure using following simple command.
or you can use following query.
How about this: