2

Ok so I am trying to import data from a CSV file into mySQL database table. The table is called serial_code, however when I try to upload the CSV file I have an error message. I have tried taking the column names out, also adding NULL to the last column EngineSerialCode and I have also viewed the CSV in a text editor and it shows the columns correctly with , comma.

Invalid column count in CSV input on line 1.

Version of phpMyAdmin and mySQL

mySQL version

Database Fields

enter image description here

CSV Fields I want to import

CSV

2
  • How you are mapping them through, you have 4th column exists in the database table (engine serialcode) Commented Jun 22, 2017 at 16:02
  • @BHouse Even when I add that column it displays that error. I am added them through "import" > browse file > Columns separated with: , Comma Columns enclosed with: " Columns escaped with: \ Lines terminated with: auto Commented Jun 23, 2017 at 7:56

1 Answer 1

1

Ok so I found the issue and it was quite frustrating. I had a serial code in my data that had a "," comma instead of a "-". Also I noticed that my CSV file EngineSerialCode was placed in column E and not D as I only have 4 columns in my database. From the image column C is overlapping column D hence my mistake.

comma and wrong column error

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.