ASP 遞歸調(diào)用 已知節(jié)點(diǎn)查找根節(jié)點(diǎn)的函數(shù)
更新時(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)文章
asp操作access提示無(wú)法從指定的數(shù)據(jù)表中刪除原因分析及解決
asp操作access時(shí)提示無(wú)法從指定的數(shù)據(jù)表中刪除這個(gè)問(wèn)題相當(dāng)?shù)募?,于是搜索整理了一些?shí)用的解決方法,感興趣的你可以參考下本文2013-03-03
ASP 支持中文的len(),left(),right()的函數(shù)代碼
在用ASP處理文字時(shí)。系統(tǒng)自帶的字符串長(zhǎng)度檢測(cè)函數(shù)有時(shí)候也不是很好用。2010-05-05
asp base64 utf-8為了兼容asp.net的base64
asp base64 utf-8為了兼容asp.net的base642009-07-07
asp中將字符串轉(zhuǎn)數(shù)字的函數(shù)小結(jié)
這篇文章主要介紹了asp中將字符串轉(zhuǎn)數(shù)字的函數(shù)小結(jié),需要的朋友可以參考下2020-09-09
asp中用數(shù)據(jù)庫(kù)生成不重復(fù)的流水號(hào)
asp中用數(shù)據(jù)庫(kù)生成不重復(fù)的流水號(hào)的實(shí)現(xiàn)代碼,需要的朋友可以參考下實(shí)現(xiàn)原理其它程序一樣。2006-09-09
獲取軟件下載的真實(shí)地址!再談獲取Response.redirect重定向的URL
獲取軟件下載的真實(shí)地址!再談獲取Response.redirect重定向的URL...2006-08-08
ASP,PHP與.NET偽造HTTP-REFERER方法及防止偽造REFERER方法探討
這篇文章主要介紹了ASP,PHP與.NET偽造HTTP-REFERER方法及防止偽造REFERER方法探討,需要的朋友可以參考下2007-02-02

