复制代码 代码如下:
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
【说明】:本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:)!