Contents
Why is my field count invalid in CSV?
The field names are all aligned correctly, but not every row has data in every field. For example, although I have a field named middle_name, not every row has a middle name in it. During the import process, is this blank field not counted as a field and thus throwing off the field count?
What does invalid value for fields : field ID mean?
If it’s a generic message that just means, “gee, there’s a problem in the data somewhere”, that’s fine, but if it in any way localizes the problem that would be a big help. I certainly don’t mean to whine here.
Why do I get error when importing CSV file?
If you get an error trying to import a contact CSV file, be sure that the data in the Reference column is unique (or blank) for each contact. If you are reimporting a file, you’ll need to change (or delete) the data in the Reference column for each contact to successfully reimport the file.
Why does MySQL know about invalid field count?
You’ll never have this problem if you keep your 1st row the header row, even if your table already has a header. You can delete the extra header row later. Why this helps is that, then mysql knows how many cells can possibly contain data, and you wont have to fill in dummy data or edit the csv or any of those things.
When to use auto increment in CSV file?
When importing data into a table from a CSV file where the table has an ‘auto_increment’ field, make the ‘auto_increment’ value for each record in the CSV field to be ‘0’ (zero). This allows the ‘auto_increment’ field to populate correctly.
Is it okay to import an empty CSV file?
As long as the CSV file you’re importing has the proper number of empty columns, it should be no problem for phpMyAdmin (and that looks like it’s probably okay based on the group of commas you pasted from your last line). How was the CSV file generated? Can you open it in a spreadsheet program to verify the line count of row 19?