ASP递归返回参数问题
时间:2011-09-01
来源:互联网
VB code
如何采用response.Write(cls_t("classid")&",")能把所有数值打印出来
如果用'RootClassID = cls_t("classid") 为什么只返回一个参数,而且重点没用一直递归下去了!
各位高手帮忙看看呀!
function RootClassID(id) if id <> "" then set cls_t = server.CreateObject("adodb.recordset") sql="Select * from About where id="&id&" order by id desc" cls_t.open sql,conn,1,1 if not cls_t.eof then Call RootClassID(cls_t("classid")) response.Write(cls_t("classid")&",") 'RootClassID = cls_t("classid") if not cls_t.eof then cls_t.MoveNext end if cls_t.Close : set cls_t = Nothing end if end function
如何采用response.Write(cls_t("classid")&",")能把所有数值打印出来
如果用'RootClassID = cls_t("classid") 为什么只返回一个参数,而且重点没用一直递归下去了!
各位高手帮忙看看呀!
作者: zhz691900169 发布时间: 2011-09-01
当然是一个值啦,你有没有用到循环。。。
作者: reciment 发布时间: 2011-09-01
VB code
各位大侠重现看下代码
如果我判断,response.write是能打印出来,可是返回值就没了!
为什么呀?
function RootClassID(id) if id <> "" then set cls_t = server.CreateObject("adodb.recordset") sql="Select * from About where id="&id&" order by id desc" cls_t.open sql,conn,1,1 if not cls_t.eof then Call RootClassID(cls_t("classid")) if cls_t("classid") = 0 then 'response.Write(cls_t("id")) RootClassID = cls_t("id") end if if not cls_t.eof then cls_t.MoveNext end if cls_t.Close : set cls_t = Nothing end if end function
各位大侠重现看下代码
如果我判断,response.write是能打印出来,可是返回值就没了!
为什么呀?
作者: zhz691900169 发布时间: 2011-09-01
都没人顶呀!
作者: zhz691900169 发布时间: 2011-09-01
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28