GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
How to query country -> province/state -> city  XML
Forum Index -> FAQ - frequently asked questions
Author Message
HermesTrismegistus



Joined: 13/10/2011 14:06:50
Messages: 3
Offline

Hello,

The last two days i have been struggling a lot with the use of the geoname database. I am not and sql expert but i managed it to insert the geonames in a Mysql database. So i have actually managed to go trough step 1.

Now i am working at step 2, i want to use the database. But i find this very confusing.

First i want to display a listbox where all the country's are loaded, so i created a query which gives me all the names of the country's in a listbox. But then i get stuck, because i after one selects a country, i want a next list appear where it's possible to select the province/state, and of course after one has selected a province/state, i want to make a last list where all the city's are displayed.

What cells/tables do i have to use, in order to make a hierachy to be able to select a country -> province/state -> city? I know i have to use the admin1codes tables etc, but what cell do i need to use, to select for example a province out of this table?

Could someone show me a simple query on how i need to use the geoname mysql database, so i get a feeling on how i need to use the tables of the geoname database.

So i want to know how to select the following parts of the database:

country->province/state->city

 
Forum Index -> FAQ - frequently asked questions
Go to:   
Powered by JForum 2.1.5 © JForum Team