Forum Moderators: coopster

Message Too Old, No Replies

How to grab a tables structure in php?

         

benj0323

2:05 am on Nov 24, 2004 (gmt 0)

10+ Year Member



Firstly, thanks for your help.

Basically what I need to do is copy tables using my php file. So is there a way to grab the table structure and then put that structure in a mysql command and create the table?

Thanks a lot for your help.

jatar_k

2:49 am on Nov 24, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



are you just copying a single table at any given time or dumping the whole db?

I think both can be accomplished using mysqldump [dev.mysql.com]

I don't often dump individual tables but I was looking at --tables and it might do it. You would really have to look at all the options available to get the output you want.