RSS
热门关键字:  递归  asp
当前位置 :| 主页>基础教程>

rs的递归

来源:本站原创 作者:青蜂侠 时间:2008-07-12 Tag:rs的递归   点击:

pID = "0001"
call areaList(pID,"0")
sub areaList(pID,jiSu)
dim rs '重要,一定要申明,否则出错
set rs = server.createobject("adodb.recordset")
sql = "select * from zk_area where parentareacode = '"&pID&"'"
rs.open sql,conn,1,1
if rs.recordcount>0 then
 do while not rs.eof  
  response.Write("["&jiSu&","""&rs("areaName")&""","""&rs("areaCode")&"""],"&vbCrLf)
  call areaList(rs("areaCode"),jiSu+1)
  rs.movenext
 loop
end if
rs.close
set rs = nothing
end sub


最新评论共有 1 位网友发表了评论
发表评论
评论内容:不能超过250字,需审核,请自觉遵守互联网相关政策法规。
用户名: 密码:
匿名?
注册