duanjue7508 2011-08-05 18:17
浏览 77
已采纳

将4个MySQL数据库表导出为XML的语法?

I'm trying to create a PHP file that will export the contents of 4 tables in my MySQL database to an XML 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!

  • 写回答

1条回答 默认 最新

  • dongmo8943 2011-08-05 18:53
    关注

    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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 TLS1.2协议通信解密
  • ¥40 图书信息管理系统程序编写
  • ¥20 Qcustomplot缩小曲线形状问题
  • ¥15 企业资源规划ERP沙盘模拟
  • ¥15 树莓派控制机械臂传输命令报错,显示摄像头不存在
  • ¥15 前端echarts坐标轴问题
  • ¥15 ad5933的I2C
  • ¥15 请问RTX4060的笔记本电脑可以训练yolov5模型吗?
  • ¥15 数学建模求思路及代码
  • ¥50 silvaco GaN HEMT有栅极场板的击穿电压仿真问题