开发者

Syntax to export 4 MySQL DB tables to XML?

I'm trying to create a PHP file that will export the contents of 4 tables in my MySQL database to an XM开发者_运维问答L file that will be downloaded to the workstation. The tables are orders, orders_products, orders_products_attributes and orders total.

I am able to do the export to xml via phpmyadmin for these tables, but it doesn't show me the syntax it's using to create it.

Any help would be appreciated!


Invoke the following command from a shell_exec() inside PHP. You'd need to add your login details alongside the -p option, of course.

mysqldump -p --xml databasename orders orders_products orders_products_attributes orders > dump.xml

details here.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜