how to import list of countries into database?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Tassadduq
Forum Commoner
Posts: 60
Joined: Wed Dec 03, 2008 2:53 pm

how to import list of countries into database?

Post by Tassadduq »

i have two text file which contains countries and city names.
the structure of the files are as
country names =
total fields in the country names text files are 4.
1=cc_fips
2=cc_iso
3=tld
4=country_name
second text file contains the cities name of all the world.
total fields in the cities names are 2
1=cc_fips
2=city_name

i have created a database named "cityofcountries".
in the database i have two tables
1=countries
2=cities

the fields of the countries tables are
1=countryid
2=countryname
3=country_tld
4=country_cc_iso
5=country_cc_fips
and the fileds of the cities table are
1=cityid
2=cityname
3=city_cc_fips

now i want to import the countries data from countries name text file into countries table and cities name data from cities name text file into cities table.

so what will be the query?
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: how to import list of countries into database?

Post by VladSun »

Do not double post topics!
viewtopic.php?f=2&t=93575
There are 10 types of people in this world, those who understand binary and those who don't
User avatar
Tassadduq
Forum Commoner
Posts: 60
Joined: Wed Dec 03, 2008 2:53 pm

Re: how to import list of countries into database?

Post by Tassadduq »

will any one help me please?
Post Reply