我是靠谱客的博主 舒心裙子,这篇文章主要介绍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

最后

以上就是舒心裙子最近收集整理的关于ASP 递归调用 已知节点查找根节点的函数的全部内容,更多相关ASP内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(125)

评论列表共有 0 条评论

立即
投稿
返回
顶部