源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

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

  • 时间:2020-09-07 18:53 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:ASP 递归调用 已知节点查找根节点的函数
[u]复制代码[/u] 代码如下:
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
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部