已采纳回答 / 慕田峪8963383
static 是静态属性,在内存中运行的,会把结果依次保存。getList($mysqlli,$row['id'])这样调用就ok,不用把$result写进去,结果数组也可用array_merge() 合并,尽量不要用static 有副作用
2017-03-18
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