当前位置:编程学习 > C#/ASP.NET >>

下面代码中的rsTotal(0)是什么参数,它等于1或者大于1的情况应该如何写在条件中

:ShowProductTotal
'作  用:显示文章总数
'参  数:无
'=================================================
sub ShowProductTotal()
dim sqlTotal
dim rsTotal
sqlTotal="select Count(*) from Product where Passed=True "
if BigClassName<>"" then
sqlTotal=sqlTotal & " and BigClassName='" & BigClassName & "' "
if SmallClassName<>"" then
sqlTotal=sqlTotal & " and SmallClassName='" & SmallClassName & "' "
end if
else
if SpecialName<>"" then
sqlTotal=sqlTotal & " and SpecialName='" & SpecialName & "' "
end if
end if
Set rsTotal= Server.CreateObject("ADODB.Recordset")
rsTotal.open sqlTotal,conn,1,1
if rsTotal.eof and rsTotal.bof then
totalPut=0
response.write "共有 0 个产品"
else
totalPut=rsTotal(0)
<!--response.Write "共有 " & totalPut & " 个产品"-->
call ShowProTotal()
end if
rsTotal.close
set rsTotal=nothing
end sub
--------------------编程问答-------------------- 应该是个方法吧。

switch

if

等等。
都可以判断条件。。 --------------------编程问答-------------------- ·双线主机 100M/35元/年,免费送数据库(自选MY/MSSQL) 
·详情请访问:http://www.515dns.com 
补充:.NET技术 ,  ASP.NET
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,