【问题标题】:mysql Importing csv data to tablemysql将csv数据导入表
【发布时间】:2013-12-21 12:51:45
【问题描述】:

我有一个 csv 值文件,我使用 php my admin 填充了要导入到 mysql 表的数据。

导入 csv 文件时,我收到此错误消息“第 11 行的 CSV 输入中的列计数无效。”

该表有这 6 列。

这是第 11 行的文本(我使用“+”作为列分隔符):

bue+rio+Full day all inclusive fly fishing dorado y tararira en San Pedro+buerio160+<a href='bue1_10.php#toursbue' title ='click for photos and detailed information about Dorado & Tararira (dogfish) Fly Fishing all inclusive Experience'>Dorado & Tararira (dogfish) Fly Fishing all inclusive Experience</a> (full day).+<b><a href='bue1_10.php#toursbue' title ='click for photos and detailed information about Dorado & Tararira (dogfish) Fly Fishing all inclusive Experience'>Dorado & Tararira (dogfish) Fly Fishing all inclusive Experience</a></b>.<br>Enjoy the incomparable experience of fly fishing Dorado and Tararira (dogfish), surrounded by a unique landscape.<br>Located very close to Buenos Aires city (a 1-hour-and-a-half drive), San Pedro consists of a delta where hundreds of streams and channels get together, giving home to these species, so desired by fly fishermen. This tour is done in private basis (full day).

如您所见,有 5 个“+”号分隔 6 列。无论如何,我得到了无效的列计数错误。

两个多小时以来,我一直在尝试许多不同的方法来解决这个问题,所以我感到非常沮丧(而且是个白痴!)。希望有人能告诉我我做错了什么。 如果你需要,我有完整的 csv 文件。

非常感谢!

弗雷德

【问题讨论】:

  • 如果您使用 + 分隔列,这不是 逗号 分隔值文件。

标签: mysql csv import


【解决方案1】:

我只在第 11 行计算 4 个“+”,这意味着该行的 csv 中有 5 列,而您的表有 6 列

bue
+
rio
+
Full day all inclusive fly fishing dorado y tararira en San Pedro+buerio160
+
<a href='bue1_10.php#toursbue' title ='click for photos and detailed information about      Dorado & Tararira (dogfish) Fly Fishing all inclusive Experience'>Dorado & Tararira (dogfish) Fly Fishing all inclusive Experience</a> (full day).
+
<b><a href='bue1_10.php#toursbue' title ='click for photos and detailed information    about Dorado & Tararira (dogfish) Fly Fishing all inclusive Experience'>Dorado & Tararira (dogfish) Fly Fishing all inclusive Experience</a></b>.<br>Enjoy the incomparable experience of fly fishing Dorado and Tararira (dogfish), surrounded by a unique landscape.<br>Located very close to Buenos Aires city (a 1-hour-and-a-half drive), San Pedro consists of a delta where hundreds of streams and channels get together, giving home to these species, so desired by fly fishermen. This tour is done in private basis (full day).

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-05-06
    • 1970-01-01
    • 1970-01-01
    • 2017-11-26
    • 2015-02-07
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多