摘要: 左右值树常规操作的逻辑2011年07月04日 星期一 17:07转自:http://hi.baidu.com/34pc/blog/item/fb239939c9cef7ea3b87cebd.html一、计算A节点的子节点数。$num = ($AR - $AL -1)/2;二、查找A节点的所有子节点。select * from tree where L > $AL and R < $AR order by L asc;三、查找A节点的所有父节点。select * from tree where L < $AL and R > $AR order by L desc;四、增 阅读全文
posted @ 2011-09-14 08:55 老泉 阅读(838) 评论(0) 推荐(0) 编辑