请高手帮忙,ASP 循环问题,当有多条时,就出错?
<%dimstr,aq,iistr=1,5,8,11aq=split(str,",")forii=LBound(aq)toubound(aq)response.write...
<%
dim str,aq,ii
str=1,5,8,11
aq=split(str,",")
for ii=LBound(aq) to ubound(aq)
response.write PayType(aq(ii))
next
%>
Function PayType(cid)
Dim rs,sql
'response.write cid
Set rs = server.CreateObject("adodb.recordset")
sql = "Select * From Uonin_Paying where id="&cid&""
rs.Open sql, oconn, 1, 1
if rs.bof and rs.eof then
PayType = ""
else
'SortText = rs("SortName")
PayType = "<a href=""Houses_List.Asp?Communityid="&rs("ID")&"&Page=1""><img src=../images/f"&rs("id")&".png alt="&rs("Paying")&"></a>"
end if
rs.Close
Set rs = Nothing
End Function 展开
dim str,aq,ii
str=1,5,8,11
aq=split(str,",")
for ii=LBound(aq) to ubound(aq)
response.write PayType(aq(ii))
next
%>
Function PayType(cid)
Dim rs,sql
'response.write cid
Set rs = server.CreateObject("adodb.recordset")
sql = "Select * From Uonin_Paying where id="&cid&""
rs.Open sql, oconn, 1, 1
if rs.bof and rs.eof then
PayType = ""
else
'SortText = rs("SortName")
PayType = "<a href=""Houses_List.Asp?Communityid="&rs("ID")&"&Page=1""><img src=../images/f"&rs("id")&".png alt="&rs("Paying")&"></a>"
end if
rs.Close
Set rs = Nothing
End Function 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询