ecshop英文国家地区表!申请加精!!

2016-07-07 15:11 来源:www.chinab4c.com 作者:ecshop专家



ecshop英文国家地区表!申请加精!!

解压附件后为2分文件

ecshop国家.txtecshops地区县市州.txt

先根据自己需求清空国家地区数据

通过SQL导入(或者SQL查询)

导入TXT中的数据

ecshops地区县市州.txt中的数据比较多

建议分段分时导入。


分段导入时,例如最后一行是

('NULL','50','Mangaia','1','0'),

记住把 逗号 , 改为 英文输入法下的 ; 否则会报错。


举例

INSERT INTO `数据库名`.`ecs_region` (
`region_id` ,
`parent_id` ,
`region_name` ,
`region_type` ,
`agency_id`
)
VALUES
('NULL','1','Badakhshan','1','0'),
('NULL','1','Badghis','1','0'),
('NULL','1','Baghlan','1','0'),
('NULL','1','Balkh','1','0'),
('NULL','1','Bamian','1','0'),
..............
..............
('NULL','1','Ghowr','20','0'),
('NULL','1','Helmand','20','0'),<----这个位置的,改为;

下一组

INSERT INTO `数据库名`.`ecs_region` (
`region_id` ,
`parent_id` ,
`region_name` ,
`region_type` ,
`agency_id`
)
VALUES
('NULL','21','Badakhshan','1','0'),
('NULL','21','Badghis','1','0'),
('NULL','21','Baghlan','1','0'),
('NULL','21','Balkh','1','0'),
('NULL','21','Bamian','1','0'),
..............
..............
('NULL','51','Ghowr','20','0'),
('NULL','51','Helmand','20','0'),<----这个位置的,改为;

以此类推。

有啥问题欢迎提问!


发一个简化版的。先清空

  1. INSERT INTO `ecs_region` (`region_id`, `parent_id`, `region_name`, `region_type`) VALUES
  2. (1, 0, 'China', 0),
  3. (2, 0, 'Hong Kong', 0),
  4. (3, 0, 'Macau', 0),
  5. (4, 0, 'Japan', 0),
  6. (5, 0, 'South Korea', 0),
  7. (6, 0, 'Taiwan', 0),
  8. (7, 0, 'South-east Asia', 0),
  9. (8, 0, 'South Pacific', 0),
  10. (9, 0, 'West Europe', 0),
  11. (10, 0, 'America', 0),
  12. (11, 0, 'Canada', 0),
  13. (12, 0, 'South Asia', 0),
  14. (13, 0, 'Central America, South America', 0),
  15. (14, 0, 'Middle East, Africa', 0),
  16. (15, 0, 'CIS, Eastern Europe', 0),
  17. (16, 7, 'Malaysia', 1),
  18. (17, 7, 'Singapore', 1),
  19. (18, 7, 'Thailand', 1),
  20. (19, 7, 'Vietnam', 1),
  21. (20, 7, 'Indonesia', 1),
  22. (21, 7, 'Philippines', 1),
  23. (22, 8, 'Australia', 1),
  24. (23, 8, 'New Zealand', 1),
  25. (24, 8, 'Brunei', 1),
  26. (25, 9, 'Belgium', 1),
  27. (26, 9, 'United Kingdom', 1),
  28. (27, 9, 'French', 1),
  29. (28, 9, 'Spain', 1),
  30. (29, 9, 'Austria', 1),
  31. (30, 9, 'Denmark', 1),
  32. (31, 9, 'Finland', 1),
  33. (32, 9, 'Greece', 1),
  34. (33, 9, 'Ireland', 1),
  35. (34, 9, 'Italy', 1),
  36. (35, 9, 'Switzerland', 1),
  37. (36, 9, 'Germany', 1),
  38. (37, 9, 'Holland', 1),
  39. (38, 12, 'Pakistan', 1),
  40. (39, 12, 'Indian', 1),
  41. (40, 12, 'Bangladesh', 1),
  42. (41, 12, 'Laos', 1),
  43. (42, 12, 'Turkey', 1),
  44. (43, 12, 'Nepal', 1),
  45. (44, 13, 'Brazil', 1),
  46. (45, 13, 'Cuba', 1),
  47. (46, 13, 'Argentina', 1),
  48. (47, 13, 'Mexico', 1),
  49. (48, 13, 'Peru', 1),
  50. (49, 13, 'Columbia', 1),
  51. (50, 13, 'Chile', 1),
  52. (51, 14, 'Iran', 1),
  53. (52, 14, 'Iraq', 1),
  54. (53, 14, 'Israel', 1),
  55. (54, 14, 'Jordan', 1),
  56. (55, 14, 'Kuwait', 1),
  57. (56, 14, 'Syria', 1),
  58. (57, 14, 'United Arab Emirates', 1),
  59. (58, 14, 'Egypt', 1),
  60. (59, 14, 'Saudi Arabia', 1),
  61. (60, 14, 'Republic of Yemen', 1),
  62. (61, 14, 'Lebanon', 1),
  63. (62, 15, 'Czech', 1),
  64. (63, 15, 'Russia', 1),
  65. (64, 15, 'Belarus', 1),
  66. (65, 15, 'Kazakh', 1),
  67. (66, 15, 'Hungary', 1),
  68. (67, 15, 'Poland', 1),
  69. (68, 15, 'Rumania', 1);
复制代码


国家.rar (26.92 KB)


回答:
没人看 自己顶

支持一下

支持楼主!正好需要!



楼主 我输入SQL查询 总是显示Duplicate entry '1' for key 1把1删除了 就会显示Duplicate entry '2' for key 1是怎么回事啊?

===================================================
已经解决了 谢谢楼主分享 节省了很多时间

研究一下!

这个好,做外贸很需要!

我是新手,楼主能否给个详细一点的安装方法??

不好意思。看错了。可以用。谢谢您。

标记一下

mark!标记一下

多谢分享,,很了不起,,,

建义加精,,不错的东东,

为什么我进数据表优化那里不能insert东西哦~怎么办?