houssam_ballout Posted February 11, 2010 Share Posted February 11, 2010 HelloI had a small phone book app, I had tables with 4 fields (ID, First Name, LaSt Name, Phone Number),and I had excel file which have 3 fields also, First Name, Last Name, phone Number)there are around 7000 records, how can I import the excel file to the database ( I am using WAMP).Thanks in advance Link to comment Share on other sites More sharing options...
justsomeguy Posted February 11, 2010 Share Posted February 11, 2010 phpMyAdmin has a way to import the file, or if it's a CSV file you can also use MySQL's command line. It's easier to use phpMyAdmin. Link to comment Share on other sites More sharing options...
houssam_ballout Posted February 11, 2010 Author Share Posted February 11, 2010 Well, in phpmyadmin, I had to chose CSVbut what as for the CSV options?:Fields terminated byFields enclosed byFields escaped byLines terminated byColumn nameswhat to put?Thanks in advance Link to comment Share on other sites More sharing options...
justsomeguy Posted February 11, 2010 Share Posted February 11, 2010 It depends how the file is formatted, the file has certain line endings, field endings, etc. If you're not sure, try the defaults. Link to comment Share on other sites More sharing options...
houssam_ballout Posted February 11, 2010 Author Share Posted February 11, 2010 It depends how the file is formatted, the file has certain line endings, field endings, etc. If you're not sure, try the defaults.Well, the defaults won't work Link to comment Share on other sites More sharing options...
justsomeguy Posted February 11, 2010 Share Posted February 11, 2010 Then you'll obviously need to figure out what the file is actually using, or export the file again and set the options there. Excel should give you those options when you save a file as CSV. I can't sit here and tell you what your file is using, how would I know that? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.