views:

870

answers:

3

I am working on a registration page for a php website as mysql as the backend database. I need a sql script to insert the list of countries with their associated provinces and the provinces with their associated cities. I need all the countries, provinces and cities all over the world which are related to each other.

I can get the individual list of countries, provinces and cities but there is no list that relates them together..

any help appreciated.. thanks in advance.

+4  A: 

look at http://www.geonames.org there is a complete list of cities all over the world with more than 1000 habitants, among others.

In particular, you can search over the dump list. The cities and countries have an id "geodatabaseid", which relates countries to cities. unfortunately, there are no provinces information for all the countries (or at least that i'm aware of)

Jhonny D. Cano -Leftware-
+3  A: 

You have this free database

http://www.geonames.org/export/

Where country / province /cities are linked

remi bourgarel
i didnot get any list out there
reggie
A: 

I found the following list for world countries and Cities:

http://www.toolsjar.com/list_generator.php?list=true&listname=American+States+and+Cities

Hope this will help

Fadi Fuad