Joesavage Posted January 28, 2008 Share Posted January 28, 2008 my phpmyadmin has a simple tool used for importing .csv files, so i thought this would be straight forward. The problem is that the .csv file I am trying to import has sometimes has commas in one of the columns. The .csv file is the maxmind database that is used for finding out what country an IP address is in, it has nearly 1000000 rows, so I cannot go through and take all the commas out by hand, even though this would solve the problem. When I try to import the file every time the import thingy gets a row with a comma in a column it aborts and reports an error. Here are the settings I am using. Fields terminated by: , Fields enclosed by: " Fields escaped by: \ Lines terminated by: \n I am pretty sure if I change this up I can make it import correctly and ignore those commas in the last column. Any suggestions? Quote Link to comment https://forums.phpfreaks.com/topic/88157-importing-csv-file-to-mysql-table/ Share on other sites More sharing options...
Daniel0 Posted January 28, 2008 Share Posted January 28, 2008 Could you post some sample data? Quote Link to comment https://forums.phpfreaks.com/topic/88157-importing-csv-file-to-mysql-table/#findComment-451225 Share on other sites More sharing options...
laffin Posted January 28, 2008 Share Posted January 28, 2008 whatca mean by Fields escaped by: \ Quote Link to comment https://forums.phpfreaks.com/topic/88157-importing-csv-file-to-mysql-table/#findComment-451240 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.