db设计:
create table if not exists `test` ( `id` int(1) not null auto_increment, `path` varchar(255) not null, `name` varchar(255) not null, primary key (`id`))engine = myisam default char set ='utf8'; insert into `test` values ('', '0', '公司'), ('', '0-1', '部门一'), ('', '0-2', '部门二'), ('', '0-3', '部门三'), ('', '0-1-1', '小组一'), ('', '0-1-2', '小组二'), ('', '0-2-1', '小组三'), ('', '0-2-2', '小组四');
php代码实现:
