帮我详解下以下SUB语句

来源:百度知道 编辑:UC知道 时间:2024/05/18 02:37:33
Sub ClassMenu(ParentId,Cid)
Dim r,imgstr
Set r=conn.execute("select Cid,[name],[level],(select count(1) from [class] where parentid=c.CId) as child from [class] c where ParentId="& ParentId &" order by SortId,CId")
Do While Not r.eof
Select Case r(2)
Case 1 imgstr="img src=""images/main_40.jpg"" width=""8"" height=""9"" align=""center"""
Case else imgstr="img src=""images/main_40.jpg"" width=""4"" height=""6"""
End Select
response.write "<tr>"&vbcrlf&_
"<td height=""10"" colspan=""2""> </td>"&vbcrlf&_
"</tr>"&vbcrlf&_
"<tr>"&vbcrlf&_
"<td width="""& r(2)*10 &"%"" a

Sub ClassMenu(ParentId,Cid)
Dim r,imgstr '字义
Set r=conn.execute("select Cid,[name],[level],(select count(1) from [class] where parentid=c.CId) as child from [class] c where ParentId="& ParentId &" order by SortId,CId") 查询数据库
Do While Not r.eof 循环到最后
Select Case r(2) 第三个字段
Case 1 imgstr="img src=""images/main_40.jpg"" width=""8"" height=""9"" align=""center""" 第三个字段为1时要实现的
Case else imgstr="img src=""images/main_40.jpg"" width=""4"" height=""6""" 否则要实现的
End Select
response.write "<tr>"&vbcrlf&_
"<td height=""10"" colspan=""2""> </td>"&vbcrlf&_
"</tr>"&vbcrlf&_
"<tr>"&vbcrlf&_
"<td width="""& r(2)*10 &"%