这段代码我不太明白

yuanxiaolei 2007-04-25 02:37:20
<!-- #include file="conn.asp" -->
<%
dim ii
ii=0
sorta(19)
sub sorta(selec)
sql="Select * From ClassTree where followid="&selec&" and hide=0 order by SortNum"
Set Rs1=Conn.Execute(sql)
do while not rs1.eof

if selec=0 then
%>
<%=rs1("ClassName")%><br />

<%
else
%>
<%=string(ii*2," ")%><%=rs1("ClassName")%><br />

<%
end if
ii=ii+1
sorta rs1("id")
ii=ii-1
rs1.movenext
loop
Set Rs1 = Nothing
end sub
%>

“sub sorta(selec)”在这起到什么作用?知道数据库中有多少条记录?
...全文
163 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
wangwm 2007-04-25
  • 打赏
  • 举报
回复
用来显示一个树

比如:
1
11
12
13
131
132
2
21
211
212
22
23
sunnycole1 2007-04-25
  • 打赏
  • 举报
回复
是查找 followid=selec 的
weiang_1983 2007-04-25
  • 打赏
  • 举报
回复
lz太吝啬了
weiang_1983 2007-04-25
  • 打赏
  • 举报
回复
。。。

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧