Jump to content


Photo

Importing CSV into MySQL using phpMyAdmin


  • Please log in to reply
4 replies to this topic

#1 timtom3

timtom3
  • Members
  • PipPip
  • Member
  • 18 posts

Posted 12 October 2005 - 09:39 AM

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


#2 Cook

Cook
  • Members
  • PipPipPip
  • Advanced Member
  • 64 posts
  • LocationSingapore

Posted 12 October 2005 - 11:21 AM

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.
Cook

#3 timtom3

timtom3
  • Members
  • PipPip
  • Member
  • 18 posts

Posted 12 October 2005 - 02:34 PM

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.

View Post



I get an error every time i try to upload it

#4 timtom3

timtom3
  • Members
  • PipPip
  • Member
  • 18 posts

Posted 12 October 2005 - 03:40 PM

I get an error every time i try to upload it

View Post



Here is an example of the text file I have how do i convert this to MySQL?

Link Here

#5 timtom3

timtom3
  • Members
  • PipPip
  • Member
  • 18 posts

Posted 12 October 2005 - 05:04 PM

Here is an example of the text file I have how do i convert this to MySQL?

Link Here

View Post


bought excel to mysql program




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users