I' going to create an excel file from my table structure in Phpmyadmin(structure only).I found that it has a CSV output but it gives me just data.
Does Phpmyadmin has any feature to do such a thing or not?
Edit: it's my sql :
SELECT * INTO OUTFILE 'c://wamp/my_table_structure.csv'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY '\n'
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'dt_user'
why it return an empty file?
You don't need a plugin to copy and paste to Excel.
I had the same problem and I achieved with the combination of PHPMyadmin and a chrome plugin. This might not be the straightforward way but it just works. (Assuming you are using Google Chrome)
Install Table capture for chrome - https://chrome.google.com/webstore/detail/table-capture/iebpjdmgckacbodjpijphcplhebcmeop/related?hl=en
Once the plugin is installed, open PHPmyadmin > DB > table > click on Structure
Right cLick on Print View > open in a new tab( this is important as the chrome plugin doesn't work on tables in an iframe)
Note: This is just a workaround and just wanted to share this. Please be easy on comments & TD's :) , and I like the way proposed by eggyal anyways!
You could run a SELECT ... INTO OUTFILE
query along the following lines:
SELECT * INTO OUTFILE '/path/to/my_table_structure.csv'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY '\n'
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'my_table'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With