Jump to content

Recommended Posts

i have a file called list.csv (below), and i am uploading it into a table with this structure:

 

id, fn, ln, user_id, updated

 

when i try to upload my .scv file through php my admin, i upload it, click "CSV" and for column names put "fn, user_id" and click upload. And its returning the following error:

Invalid field count in CSV input on line 1.

 

Whats wrong?

 

Thanks!

list.csv:

Bob, 345275
Tim, 2547354
Test, 5763

Link to comment
https://forums.phpfreaks.com/topic/152685-upload-to-phpmyadmin-with-csv/
Share on other sites

You probably need to have data for every column in your csv file.

 

Something like:

1, 1, 1, Bob, 345275
2, 2, 2, Tim, 2547354
3, 3, 3, Test, 5763

 

Or just make the table with only 2 columns, import the csv file and then go back in and add the other columns.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.