您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息
免费发信息
三六零分类信息网 > 通化分类信息网,免费分类信息发布

建立一个高效的树表 Tree Table

2024/3/14 0:01:25发布43次查看
打开此地址查看, 永久有效 ,老手绕行 领接表增强 + mptt 两种模式 http://mat1.gtimg.com/hb/js/common/demo/tree.html 超快查询所有子孙 画个table,写了样式,居然被替换的面目全非,所以,干脆做成html算了。 无 查询子集select * from `table` where `p
打开此地址查看, 永久有效 ,老手绕行
领接表增强 + mptt 两种模式
http://mat1.gtimg.com/hb/js/common/demo/tree.html
超快查询所有子孙
画个table,写了样式,居然被替换的面目全非,所以,干脆做成html算了。
查询子集select * from `table` where `pid` = 3查询子孙集select * from `table` where `place` like '%/3/%'查询某代子集select * from `table` where `place` like '%/3/%' and `level` = 4插入$insert_id = insert into `table` (`name`,`pid`) values('面试专员','10')$parent = select * from `table` where `id` = 10 update `table` set `place` = '{$parent['place']}{$insert_id}/',`level`= {$parent['level']} + 1 where `id` = {$insert_id}修改父级$parent = select * from `table` where `id` = {$pid}update `table` set `pid` = {$pid},`place` = '{$parent['place']}{$insert_id}/',`level`= {$parent['level']} + 1 where `id` = {$id}
通化分类信息网,免费分类信息发布

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录