While doing my projects, I need countries list of the world in most of them. I have to populate the list in the select option. So I prefer keeping them in the database and populate it dynamically from serverside rather than copy/pasting the html code. I have created this post to save time that I dont have to go to google and search list of countries. This will be helpful if not anyone then at least for me :D
This is the CREATE structure for the countries.
CREATE TABLE `countries` (
`id` int(11) NOT NULL auto_increment,
`country` varchar(50) NOT NULL default '',
`iso2` varchar(2) NOT NULL default '',
`iso3` varchar(3) NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
Whole MySQL dump code can be found
here .
If you still prefer HTML options list, then you can use
this in your project.
0 comments:
Post a Comment