【问题标题】:XML to phpmyadminXML 到 phpmyadmin
【发布时间】:2017-06-05 16:44:44
【问题描述】:

我想将 XMl 文件导入 phpmyadmin。

我有一个包含 75000 行的 XML 文件,因此单独插入这些值是一个很大的问题,当我尝试将文件作为 XMl 导入数据库时​​,它给出了以下消息:

Import has been successfully finished, 0 queries executed. 

The following structures have either been created or altered. Here you can:
View a structure's contents by clicking on its name.
Change any of its settings by clicking the corresponding "Options" link.
Edit structure by following the "Structure" link.

wp_db (Options)
(xmlfile.xml)

-----------------------------------------------------------------------

Notice in ./libraries/plugins/import/ImportXml.php#158
Undefined index: pma

Backtrace

./import.php#652: PMA\libraries\plugins\import\ImportXml->doImport(array)

phpmyadmin 在 MAMP 后面,xml 文件的简短版本如下所示:

<Report>
    <Row1>
        <Reference>123</Reference>
        <Nature>Outside</Nature>
        <Disponibility>Full</Disponibility>
        <State>In progress</State>
        <Person>Jon</Person>
        <Seller></Seller>
    </Row1>
    <Row2>
        <Reference>123</Reference>
        <Nature>Outside</Nature>
        <Disponibility>Full</Disponibility>
        <State>In progress</State>
        <Person>Jon</Person>
        <Seller></Seller>
    </Row2>
</Report>

如果至少不可能,那么最简单的方法是什么? 谢谢!

【问题讨论】:

    标签: mysql xml database phpmyadmin


    【解决方案1】:

    phpMyAdmin 仅在遵循特殊格式时才支持导入 XML。您可以通过在 phpMyAdmin 中以 XML 格式导出表格来查看确切的格式。您需要以编程方式修改现有文件以适应支持的格式。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-01-22
      • 1970-01-01
      • 2019-04-08
      • 1970-01-01
      • 2011-11-19
      • 1970-01-01
      • 2016-07-15
      相关资源
      最近更新 更多