Python语言技术文档

微信小程序技术文档

php语言技术文档

jsp语言技术文档

asp语言技术文档

C#/.NET语言技术文档

html5/css技术文档

javascript

点击排行

您现在的位置:首页 > 技术文档 > asp函数/类库

asp递归调用_已知节点查找根节点的函数

来源:中文源码网    浏览:162 次    日期:2024-05-06 11:52:07
【下载文档:  asp递归调用_已知节点查找根节点的函数.txt 】


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

相关内容