Page 1 of 1

South African city/town list

Posted: 27 Mar 2010, 15:06
by octall
I am looking for a sql query that I can use to inject all the cities and towns in SA to our database on our website. To type in every town and city into our backoffice is just going to take ages.

Any ideas would be greatly appreciated.

Re: South African city/town list

Posted: 27 Mar 2010, 15:20
by Anthro
What are the tables called ? you need post codes too ?

Re: South African city/town list

Posted: 27 Mar 2010, 16:06
by octall
Maybe if I explain what I need to do you will have an idea of what needs to be done.

1. I want customers to select the country they live in (In my site it will be not be the country but province) from the drop down list.
2. Select the town or city they live in from a drop down list.

Now when they checkout it will automatically calculate a shipping rate which I set.
1. In the shipping module you can select to only make a certain module available only for a specific zone, now how do I do it so that people can select that zone. ie city/town they selected in "2" above.

Here's an example:
1. Country: South Africa
City: Port Elizabeth
Shipping method: Flat rate

2. Country: South Africa
City: Any other city
Shipping method: Table rate

I thought if I have a complete list of cities it will work, but having all the towns and cities listed in one drop down list will be quite big.

I know this is kinda off topic, but it can be moved if so needs be to be done.

Re: South African city/town list

Posted: 27 Mar 2010, 18:38
by Anthro
I can provide you with a SQL file with cities, suburbs, towns,postcodes etc. what are your table names where the items will be inserted - or do you just want the list ?
I have it in the following format
(POSTCODE,CITY,BOX,STREET) Street being if it is a street address or not.
http://www.quickshare.co.za/files/herr231n/db.sql.html
Work with it - its all I have at the moment.. lol took me a while to do.. so appreciate