Jump to content

Archived

This topic is now archived and is closed to further replies.

timtom3

Importing CSV into MySQL using phpMyAdmin

Recommended Posts

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

 

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

×

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.