欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

ASP 遞歸調(diào)用 已知節(jié)點(diǎn)查找根節(jié)點(diǎn)的函數(shù)

 更新時間:2009年12月08日 00:31:14   作者:  
已知節(jié)點(diǎn)查找根節(jié)點(diǎn)的asp函數(shù)
復(fù)制代碼 代碼如下:

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

相關(guān)文章

最新評論