Invalid field count in CSV input on line 1

后端 未结 6 1449
孤独总比滥情好
孤独总比滥情好 2021-01-16 14:15

I am trying to export an ODS file to CSV, but when I import into phpmyadmin - I get \"Invalid field count in CSV input on line 1.\"

File (it has more than two lines

6条回答
  •  囚心锁ツ
    2021-01-16 14:29

    If you use phpMyAdmin, then you are allowed to specify column names. When logged into the desired database:

    1. Select the table you want to import to.
    2. Click the Import tab.
    3. Under Format of imported file, select CSV.
    4. In Column names, write out a comma separated list of the columns you want the data imported to.

    You can also use mysqlimport if you prefer the shell.

    For Example:

    shell>mysqlimport --columns=column1,column2 dbname imptest.txt
    

提交回复
热议问题