手机
当前位置:查字典教程网 >编程开发 >ASP教程 >ASP 递归调用 已知节点查找根节点的函数
ASP 递归调用 已知节点查找根节点的函数
摘要:复制代码代码如下:FunctiongetTreeRootId(pNodeId)getSQL="selectnote_id,parent_id...

复制代码 代码如下:

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

【ASP 递归调用 已知节点查找根节点的函数】相关文章:

ASP调用带参数存储过程的几种方式

asp 日期格式化函数

一个实用asp分页函数

使用ASP在IIS创建WEB站点的函数

使用ASP控制指定站点解析脚本语言函数

ASP常用函数:LastDay()

ASP怎么谈到应用到类的?

ASP调用存储过程的技巧

ASP中常用的变量命名规则

ASP常用函数:getIMG()

精品推荐
分类导航