采用Eclipse 编写的关于省市县三级菜单采用JSP +servlet+MYSQL ,数据库表的数据文件在src文件夹中
mysql> show tables;
+----------------+
| Tables_in_area |
+----------------+
| area |
| cities |
| provinces |
+----------------+
3 rows in set (0.00 sec)
mysql> desc provinces;
+----------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+----------+--------------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| pid | char(6) | NO | | NULL | |
| province | varchar(100) | NO | | | |
+----------+--------------+------+-----+---------+----------------+
3 rows in set (0.00 sec)
mysql> desc cities;
+-------+-------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------+-------------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| cid | char(6) | NO | | NULL | |
| city | varchar(40) | NO | | NULL | |
| pid | char(6) | NO | | NULL | |
+-------+-------------+------+-----+---------+----------------+
4 rows in set (0.00 sec)
mysql> desc area;
+-------+-------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------+-------------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| aid | char(6) | NO | | NULL | |
| area | varchar(40) | NO | | NULL | |
| cid | char(6) | NO | | NULL | |
+-------+-------------+------+-----+---------+----------------+
4 rows in set (0.00 sec)