phpcms2008正式版发布之前,我制作了一个地区表,正式版发布之后,一直没有时间作修正,今天就正式放出正式版的地区表。以phpcms_area为例,如果你的前缀不是phpcms_,那请用记事本替换。
下载地址:areasql
替换方法:Ctrl+h 搜索phpcms_area 替换为 你的前缀_area

其实也就是改两处,第一行和第二行

导入方法:在phpcms2008后台,打开系统设置_数据库管理_执行SQL,粘贴,然后执行就可以了。如果只需要省份,只要insert到第34(34, ‘澳门特别行政区’, ”, 0, ‘0’, 0, ’34’, ‘area’, 34, 0);就可以了。

第一句:

TRUNCATE TABLE `phpcms_area`

为清空地区表,否则会出错,因为第一个字段areaid为自增加字段,不能重复

SQL:

TRUNCATE TABLE `phpcms_area` ;
INSERT INTO `phpcms_area` (`areaid`, `name`, `style`, `parentid`, `arrparentid`, `child`, `arrchildid`, `template`, `listorder`, `hits`) VALUES
(1, ‘北京市’, ”, 0, ‘0’, 1, ‘1,52’, ‘area’, 1, 0),
(2, ‘天津市’, ”, 0, ‘0’, 1, ‘2,70’, ‘area’, 2, 0),
(3, ‘河北省’, ”, 0, ‘0’, 1, ‘3,81’, ‘area’, 3, 0),
(4, ‘山西省’, ”, 0, ‘0’, 1, ‘4,92’, ‘area’, 4, 0),
(5, ‘内蒙古自治区’, ”, 0, ‘0’, 1, ‘5,104’, ‘area’, 5, 0),
(6, ‘辽宁省’, ”, 0, ‘0’, 1, ‘6,118’, ‘area’, 6, 0),
(7, ‘吉林省’, ”, 0, ‘0’, 1, ‘7,127’, ‘area’, 7, 0),
(8, ‘黑龙江省’, ”, 0, ‘0’, 1, ‘8,141’, ‘area’, 8, 0),
(9, ‘上海市’, ”, 0, ‘0’, 1, ‘9,160’, ‘area’, 9, 0),
(10, ‘江苏省’, ”, 0, ‘0’, 1, ‘10,173’, ‘area’, 10, 0),
(11, ‘浙江省’, ”, 0, ‘0’, 1, ‘11,184’, ‘area’, 11, 0),
(12, ‘安徽省’, ”, 0, ‘0’, 1, ‘12,201’, ‘area’, 12, 0),
(13, ‘福建省’, ”, 0, ‘0’, 1, ‘13,210’, ‘area’, 13, 0),
(14, ‘江西省’, ”, 0, ‘0’, 1, ‘14,221’, ‘area’, 14, 0),
(15, ‘山东省’, ”, 0, ‘0’, 1, ‘15,238’, ‘area’, 15, 0),
(16, ‘河南省’, ”, 0, ‘0’, 1, ‘16,255’, ‘area’, 16, 0),
(17, ‘湖北省’, ”, 0, ‘0’, 1, ‘17,268’, ‘area’, 17, 0),
(18, ‘湖南省’, ”, 0, ‘0’, 1, ‘18,282’, ‘area’, 18, 0),
(19, ‘广东省’, ”, 0, ‘0’, 1, ‘19,303’, ‘area’, 19, 0),
(20, ‘广西壮族自治区’, ”, 0, ‘0’, 1, ‘20,304,305,306,307,308,309,310,311,312,313,314,315,316,317’, ‘area’, 20, 0),
(21, ‘海南省’, ”, 0, ‘0’, 1, ‘21,318,319’, ‘area’, 21, 0),
(22, ‘重庆市’, ”, 0, ‘0’, 1, ‘22,359’, ‘area’, 22, 0),
(23, ‘四川省’, ”, 0, ‘0’, 1, ‘23,380’, ‘area’, 23, 0),
(24, ‘贵州省’, ”, 0, ‘0’, 1, ‘24,389’, ‘area’, 24, 0),
(25, ‘云南省’, ”, 0, ‘0’, 1, ‘25,405’, ‘area’, 25, 0),
(26, ‘西藏自治区’, ”, 0, ‘0’, 1, ‘26,412’, ‘area’, 26, 0),
(27, ‘陕西省’, ”, 0, ‘0’, 1, ‘27,422’, ‘area’, 27, 0),
(28, ‘甘肃省’, ”, 0, ‘0’, 1, ‘28,436’, ‘area’, 28, 0),
(29, ‘青海省’, ”, 0, ‘0’, 1, ‘29,444’, ‘area’, 29, 0),
(30, ‘宁夏回族自治区’, ”, 0, ‘0’, 1, ‘30,449’, ‘area’, 30, 0),
(31, ‘新疆维吾尔自治区’, ”, 0, ‘0’, 1, ‘31,463’, ‘area’, 31, 0),
(32, ‘台湾省’, ”, 0, ‘0’, 0, ’32’, ‘area’, 32, 0),
(33, ‘香港特别行政区’, ”, 0, ‘0’, 0, ’33’, ‘area’, 33, 0),
(34, ‘澳门特别行政区’, ”, 0, ‘0’, 0, ’34’, ‘area’, 34, 0);

全部数据表,已经发布在bbs.phpcms.cn。http://bbs.phpcms.cn/thread-76180-1-1.html