5

I want to retrieve names of all the states list of a particular country which is selected from a drop down menu.

I know how to retrieve the list of all countries via apple code but now i want the list of all the states.

Is there any code db or API available for that?

Alex K
  • 22,315
  • 19
  • 108
  • 236
Aakil Ladhani
  • 984
  • 9
  • 32
  • Right now i m not storing any data for that that's why i m asking from where i can get that db or data??? – Aakil Ladhani Sep 10 '12 at 09:31
  • Possible Duplicate: http://stackoverflow.com/questions/5813256/how-to-put-all-countries-cities-states-of-the-world-into-my-database – Ramaraj T Sep 10 '12 at 10:44

1 Answers1

8

You can download this sqlite file. This is a database of countries with their respective states. you can re - create a query every time the user selects a country.

NSString *queryString = [NSString stringWithFormat:@"select zone_id , name from
                       zone where country_id = %d", countryID];
janusfidel
  • 8,036
  • 4
  • 30
  • 53