Home > php教程 > PHP源码 > body text

php递归实现无限分类原理

PHP中文网
Release: 2016-05-25 17:11:08
Original
1165 people have browsed it

代码

DROP TABLE IF EXISTS `navs`;
CREATE TABLE IF NOT EXISTS `navs` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(32) NOT NULL,
  `pid` int(11) NOT NULL DEFAULT '0',
  `path` char(128) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
INSERT INTO `navs` (`id`, `name`, `pid`) VALUES
(1, '舞文弄墨', 0, '-1-'),
(2, '似水流年', 2, '-2-'),
(3, '隔岸观火', 2, '-2-3-'),
(4, 'WEB开发', 0, '-4-'),
(5, 'PHP', 4, '-4-5-'),
(6, 'Javascript', 4, '-4-6-');
(7, 'jquery', 6, '-4-6-7-');
Copy after login

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template