Jump to content

importing csv file in phpmyadmin


sudhakararaog

Recommended Posts

i would like to import a csv file into the database so that i do not have to manually make entries when using a cms

 

 

initially i selected the database and then the table into which i want to add new data and exported as csv file and then added deleted all the entries in this file and added 1 new entry following the format in the csv file that i exported

 

when i import this csv file i keep getting the error

 

Invalid field count in CSV input on line 1.

 

while importing the csv file i have changed Fields terminated by from ; to ,

 

what is the correct procedure so that i dont get this error

 

also when exporting as csv file should i select the Put fields names in the first row option and there are other options as well, how should i go about so that i dont get the error when importing

 

 

also if i select the sql option and then delete the entries and make a new entry and if i import this file i get the error

#1062 - Duplicate entry '1' for key 'PRIMARY'

 

before importing i have selected the database and selected the table into which i want to import the csv or sql file

 

also before importing the files i suppose i have to make sure that the file i import is the same name as the table whether i import a csv or sql file

 

please advice how to go about for csv and sql format

 

also i guess the procedure for csv format can be followed for an

Microsoft Excell 2000 and CSV for MS Excel i guess

 

Link to comment
Share on other sites

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.