{"id":179,"date":"2008-05-26T04:51:00","date_gmt":"2008-05-26T04:51:00","guid":{"rendered":"http:\/\/blog.trungson.com\/?p=179"},"modified":"2008-05-26T04:51:00","modified_gmt":"2008-05-26T04:51:00","slug":"mysql-database-for-geographical-regions","status":"publish","type":"post","link":"http:\/\/blog.trungson.com\/?p=179","title":{"rendered":"MySQL database for geographical regions"},"content":{"rendered":"<p><textarea name=\"code\" class=\"sql\"><br \/>\nCREATE TABLE `geo_region` (<br \/>\n  `RegionId` int(10) unsigned NOT NULL default &#8216;0&#8217;,<br \/>\n  `CountryId` int(10) unsigned NOT NULL default &#8216;0&#8217;,<br \/>\n  `Region` varchar(100) NOT NULL default &#8221;,<br \/>\n  `Code` char(2) NOT NULL default &#8221;,<br \/>\n  `ADM1Code` varchar(4) NOT NULL default &#8221;,<br \/>\n  PRIMARY KEY  (`RegionId`),<br \/>\n  KEY `CountryId` (`CountryId`),<br \/>\n  KEY `Region` (`Region`)<br \/>\n) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT=&#8217;Regions from GeoBytes&#8217;;<\/p>\n<p>&#8212;<br \/>\n&#8212; Dumping data for table `geo_region`<br \/>\n&#8212;<\/p>\n<p>INSERT INTO `geo_region` VALUES(1, 14, &#8216;Victoria&#8217;, &#8216;VI&#8217;, &#8216;AS07&#8217;);<br \/>\nINSERT INTO `geo_region` VALUES(2, 14, &#8216;Tasmania&#8217;, &#8216;TS&#8217;, &#8216;AS06&#8217;);<br \/>\nINSERT INTO `geo_region` VALUES(3, 14, &#8216;Queensland&#8217;, &#8216;QL&#8217;, &#8216;AS04&#8217;);<br \/>\nINSERT INTO `geo_region` VALUES(4, 14, &#8216;New South Wales&#8217;, &#8216;NS&#8217;, &#8216;AS02&#8217;);<br \/>\nINSERT INTO `geo_region` VALUES(5, 14, &#8216;South Australia&#8217;, &#8216;SA&#8217;, &#8216;AS05&#8217;);<br \/>\nINSERT INTO `geo_region` VALUES(6, 14, &#8216;Western Australia&#8217;, &#8216;WA&#8217;, &#8216;AS08&#8217;);<br \/>\nINSERT INTO `geo_region` VALUES(7, 14, &#8216;Northern Territory&#8217;, &#8216;NT&#8217;, &#8216;AS03&#8217;);<br \/>\n<\/textarea><br \/>\nFull file: <a href=\"http:\/\/blog.trungson.com\/uploads\/georegions.txt\">uploads\/georegions.txt<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>CREATE TABLE `geo_region` ( `RegionId` int(10) unsigned NOT NULL default &#8216;0&#8217;, `CountryId` int(10) unsigned NOT NULL default &#8216;0&#8217;, `Region` varchar(100) NOT NULL default &#8221;, `Code` char(2) NOT NULL default &#8221;, `ADM1Code` varchar(4) NOT NULL default &#8221;, PRIMARY KEY (`RegionId`), KEY `CountryId` (`CountryId`), KEY `Region` (`Region`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT=&#8217;Regions from GeoBytes&#8217;; &#8212; &#8212; Dumping [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"_links":{"self":[{"href":"http:\/\/blog.trungson.com\/index.php?rest_route=\/wp\/v2\/posts\/179"}],"collection":[{"href":"http:\/\/blog.trungson.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.trungson.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.trungson.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.trungson.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=179"}],"version-history":[{"count":0,"href":"http:\/\/blog.trungson.com\/index.php?rest_route=\/wp\/v2\/posts\/179\/revisions"}],"wp:attachment":[{"href":"http:\/\/blog.trungson.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=179"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.trungson.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=179"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.trungson.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=179"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}