Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Importing Cvs Files In Phpmyadmin
Carson
post May 8 2007, 06:17 AM
Post #1


Super Member
*********

Group: [HOSTED]
Posts: 301
Joined: 29-April 07
Member No.: 42,353



More Database problems...I need to know how to import CSV files into existing tables, in PhpMyAdmin.

For example, I have a members table, which contains 220 members. Now, I have a CSV file which contains another 50 members, obtained after I last backed up my database(With 220 members). The data for the extra members have been exported in CSV form, so I need to import this data into the members table, to get the rest of the members. I also need to do this for a few other tables.

I hope I can get some help with this. Thanks in advance.
Go to the top of the page
 
+Quote Post
Carson
post May 11 2007, 02:45 PM
Post #2


Super Member
*********

Group: [HOSTED]
Posts: 301
Joined: 29-April 07
Member No.: 42,353



It looks like no one knows how to do this. I figured it out on my own, and I will explain it here and hopefully this will help some people.

In my case, I had a previously backed up database, so I had all the database tables uploaded.


First of all, open PhpMyAdmin from your CPanel. In order to import data into your tables, by using a CSV file, you first must select the database, and then click on the table which you want to import the data into.

Once you have selected the table, you will a row of tabs at the top. Click on the "Import" tab.

Now click on the "Browse" button, and select the CSV file you want to import. In the "Format of imported file" box, the CSV radio button should already be selected.

Depending on the layout of your CSV file, you may need to select the "CSV using LOAD DATA" radio button. There are other options inside the "Options for CSV import using LOAD DATA" which are Replace table data with file, Ignore duplicate rows. You should know if you need to select those or not.

Then just click on the "Go" button, and the data in your CSV file should be imported into the table.
Go to the top of the page
 
+Quote Post
babyboomer
post Jan 25 2008, 12:25 PM
Post #3


Newbie [Level 3]
***

Group: Members
Posts: 40
Joined: 15-January 08
Member No.: 56,293



I find it a lot more easier to handle mysql tables through command line interface. For instance if you want to upload a csv file to a table just do:

>load data local infile 'yourfile.csv' into table yourtable fields terminated by ';' lines terminated by '\n' (field1,field2,...,fieldN);

Try it smile.gif

Once you get used to it it will be a lot easier for you too.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Defragment: Cannot Defrag All Fragmented Files(8)
  2. Does Anyone Know How To Make Exe Files(16)
  3. Table Duplication(5)
  4. Cutting Mp3 And Midi Files(12)
  5. Delete Files And Directories Using Php(7)
  6. Installing Apache, Mysql, Phpmyadmin Locally(5)
  7. The Icons Of Zip Files Are Wrong Everytime!(3)
  8. Flatfile User Login/signup(21)
  9. Software That Will Convert .cue/.bin Files To A Different Format Like .avi(10)
  10. How To Fix Problems With Shareaza(1)
  11. Delete A Bunch Of Files Using Dos Statement(4)
  12. Make Your Own Phpmyadmin(6)
  13. Sharing Files And Printer Between Windows Vista And Xp(8)
  14. Supported Files(2)
  15. How To Hide Your Important Files And Folders(7)
  1. Where Do I Upload My Ftp Files? [resolved](1)
  2. Treating .csv Files As Database Data(2)
  3. Css Problem On Website(8)
  4. Freeware Game Files(1)
  5. Download Script For Mp3 Files(0)
  6. Download Files Off Esnips.com(0)
  7. Save Youtube Files(21)
  8. Need Some Help In File Browser(8)
  9. Acessing Files In Mac Os X(0)
  10. Deleted Some Important Files In Your Usb/ Mem Stick?(1)
  11. Search For Video Files And Display Them(0)
  12. Phpmyadmin Error(4)
  13. Phpmyadmin Error [resolved](7)


 



- Lo-Fi Version Time is now: 12th May 2008 - 04:41 AM