在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
复制代码 代码如下: 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 |
请发表评论