Free World Countries and States Database for MySQL

I was looking for world Countries and states to fill my MySQL Database, I could get the Countries database but not the states. There are some paid services available which even provide cities database.

Some Where I got the countries.js which provides all countries and states data and fills the database in varchar format (a free form).

I made a script to insert the countries.js data into MySQL. First Converted the JS arrays of countries.js to PHP format and loop through the array to insert the countries into the database.

You can download the script here.


Leave a Reply

Your email address will not be published. Required fields are marked *