Jump to content

Importing CSV into MySQL using phpMyAdmin


timtom3

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

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.