/*
综合上面的实例我们就可以看得,其实这就是php+ajax实例的无刷新二级菜单了,只是使用的方法不一样罢了。
*/
?>
city.sql
use `test`;
/*table structure for table `city` */
drop table if exists `city`;
create table `city` (
`id` int(4) not null auto_increment,
`city_name` varchar(255) not null,
`province_id` int(4) not null,
primary key (`id`)
) engine=innodb default charset=utf8;
/*data for the table `city` */
insert into `city`(`id`,`city_name`,`province_id`) values (1,'福州',1),(2,'厦门',1),(3,'龙岩',1),(4,'漳州',1),(5,'深圳',2),(6,'广州',2);
provice.sql
create database /*!32312 if not exists*/`test` /*!40100 default character set utf8 */;
use `test`;
/*table structure for table `province` */
drop table if exists `province`;
create table `province` (
`id` int(4) not null auto_increment,
`name` varchar(255) not null,
primary key (`id`)
) engine=innodb default charset=utf8;
/*data for the table `province` */
insert into `province`(`id`,`name`) values (1,'福建省'),(2,'广东省');