-
UID:175553
-
- 注册时间2008-11-05
- 最后登录2018-02-12
- 在线时间3876小时
-
- 发帖16250
- 搜Ta的帖子
- 精华12
- 黑豆-2
- 威望45224
- 贡献值2
- 交易币0
- 红豆0
-
访问TA的空间加好友用道具
- 发帖
- 16250
- 黑豆
- -2
- 威望
- 45224
- 贡献值
- 2
- 交易币
- 0
- 红豆
- 0
|
已知节点查找根节点的asp函数 复制代码代码如下:
Function getTreeRootId(pNodeId) getSQL = "select note_id,parent_id from [T_tree_demo] where note_id='"& pNodeId &"'" Set getRs = db.Execute(getSQL) If Not getRs.eof Then If Trim(getRs("parent_id")) = "0" Then getTreeRootId = Trim(getRs("note_id")) Exit Function Else getTreeRootId = getTreeRootId(Trim(getRs("parent_id"))) End If Else getTreeRootId = 0 Exit Function End If getRs.close Set getRs = Nothing End Function
|