Welcome to WebmasterWorld Guest from 23.22.250.113

Forum Moderators: phranque

Message Too Old, No Replies

CSV files won't upload

Invalid field count in CSV input on line 1

     

Lovejoy

4:03 am on Jan 5, 2008 (gmt 0)

10+ Year Member



Hi All,

I've been trying to upload a csv file to my database set up on godaddy via Phpmyadmin, but I keep getting the same error message, "Invalid field count in CSV input on line 1"

I've only got five columns in the database table and my csv file reads as follows eg.

HNnumber,Name,Description,Issued,Value
HN4793,Lady Sarah Jane,NA,New release,375.00,

I've uploaded this same csv to another database without any problem, anyone have any idea what's wrong?

Lovejoy

Lovejoy

2:50 pm on Jan 5, 2008 (gmt 0)

10+ Year Member



I figured it out, the phpmyadmin didn't like the comma at the end of the row. I removed the comma at the end of each line (all 485 0f them)and up it went. Strange, the other uploader would accept csv's without a comma on the end.

Lovejoy

rocknbil

7:25 pm on Jan 5, 2008 (gmt 0)

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Well, you got it - but the extra comma at the end told the program there was another field there with a blank value. The end of a line is determined by the newline character between the lines.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month