INSERT INTO `wuxianfenji` (`id`, `pid`, `catename`, `cateorder`, `createtime`)
VALUES
(1,0,'新闻',0,0),
(2,0,'图片',0,0),
(3,1,'国内新闻',0,0),
(4,1,'国际新闻',0,0),
(5,3,'北京新闻',0,0),
(6,4,'美国新闻',0,0),
(7,2,'美女图片',0,0),
(8,2,'风景图片',0,0),
(9,7,'日韩明星',0,0),
(10,9,'日本AV',0,0);
VALUES
(1,0,'新闻',0,0),
(2,0,'图片',0,0),
(3,1,'国内新闻',0,0),
(4,1,'国际新闻',0,0),
(5,3,'北京新闻',0,0),
(6,4,'美国新闻',0,0),
(7,2,'美女图片',0,0),
(8,2,'风景图片',0,0),
(9,7,'日韩明星',0,0),
(10,9,'日本AV',0,0);
2017-03-06
新手看这里:查询语句这个比较完整,不然会出错的
$sql="select id,catename,path,concat(path, ',' ,id) as fullpath from likecate where 1 order by fullpath asc";
$sql="select id,catename,path,concat(path, ',' ,id) as fullpath from likecate where 1 order by fullpath asc";
2017-02-22
mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in
2017-02-04
getList(arg1,arg2){} 第一参数为零,表示顶级菜单,,然后把这条记录获取出来,然后获取其id 传给自身函数调用,第二次调用,就把pid 等于第一条取出来的id值,的子类菜单,都取出来,一一遍历穿进去数组,返回出来!~~
2017-01-08