timtom3 Posted October 12, 2005 Share Posted October 12, 2005 How do I import a CSV file into MySQL using phpMyAdmin my table is set out like this: CREATE TABLE zipcodes ( zipcode varchar(9) NOT NULL default '0', latitude decimal(13,12) NOT NULL default '0.000000000000', longitude decimal(13,12) NOT NULL default '0.000000000000', town varchar(25) NOT NULL default '0', address1 varchar(25) NOT NULL default '', address2 varchar(25) NOT NULL default '', county varchar(30) NOT NULL default '', PRIMARY KEY (zipcode), UNIQUE KEY zipcode_2 (zipcode), KEY zipcode (zipcode) ) TYPE=MyISAM; My data is set out like this: zipcode Latitude Longitude town address1 address2 county BB1 1BA 53.74564368 -2.4715445 Blackburn Bristol Close Lancashire Quote Link to comment https://forums.phpfreaks.com/topic/2653-importing-csv-into-mysql-using-phpmyadmin/ Share on other sites More sharing options...
Cook Posted October 12, 2005 Share Posted October 12, 2005 At the very bottom of the page giving the structure of your table, there's a link that allows you to insert data into the table from a file. Quote Link to comment https://forums.phpfreaks.com/topic/2653-importing-csv-into-mysql-using-phpmyadmin/#findComment-8810 Share on other sites More sharing options...
timtom3 Posted October 12, 2005 Author Share Posted October 12, 2005 At the very bottom of the page giving the structure of your table, there's a link that allows you to insert data into the table from a file. 305567[/snapback] I get an error every time i try to upload it Quote Link to comment https://forums.phpfreaks.com/topic/2653-importing-csv-into-mysql-using-phpmyadmin/#findComment-8811 Share on other sites More sharing options...
timtom3 Posted October 12, 2005 Author Share Posted October 12, 2005 I get an error every time i try to upload it 305638[/snapback] Here is an example of the text file I have how do i convert this to MySQL? Link Here Quote Link to comment https://forums.phpfreaks.com/topic/2653-importing-csv-into-mysql-using-phpmyadmin/#findComment-8812 Share on other sites More sharing options...
timtom3 Posted October 12, 2005 Author Share Posted October 12, 2005 Here is an example of the text file I have how do i convert this to MySQL? Link Here 305667[/snapback] bought excel to mysql program Quote Link to comment https://forums.phpfreaks.com/topic/2653-importing-csv-into-mysql-using-phpmyadmin/#findComment-8813 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.