<%
categoryname=request("categoryname")
keyword=request("keyword")
trade=request("trade")
trade= trade & ","
tradename=request("tradename")
if categoryname="" then
if keyword<>"" then
categoryname="关于:"&keyword
else
categoryname="综合资讯"
end if
end if
Dim pagesize,currentpage,strwhere,url,str
str=""
pagesize=26
currentpage=request("page")
If currentpage="" Or currentpage<1 Or currentpage=Null Then
currentpage=1
End If
url="status=1&categoryname="&categoryname
strwhere="status=1"
strwhere1="status=1"
tempcategory=trim(request("category"))
translation=trim(request("translation"))
products=trim(request("products"))
if isnumeric(translation) and translation<>"" then
strwhere=strwhere&" and translation="&translation
strwhere1=strwhere1&" and translation="&translation
url=url&"&translation="&translation
else
if isnumeric(tempcategory) and tempcategory<>"" then
if InStr(tempcategory,",")>0 then
arrcate=split(tempcategory,",")
for i=0 to ubound(arrcate)
str=str&" or category="&arrcate(i)
next
str="( "&right(str,len(str)-3)&" )"
strwhere=strwhere&" and "&str
strwhere1=strwhere1&" and "&str
else
strwhere=strwhere&" and category="&tempcategory
strwhere1=strwhere1&" and category="&tempcategory
end if
url=url&"&category="&tempcategory
end if
end if
if trade<>"" then
strwhere=strwhere&" and trades like '%"& trade &"%'"
strwhere1=strwhere1&" and trades like '%"& trade &"%'"
url=url&"&trade="&trade
end if
Set rs=server.CreateObject("ADODB.Recordset")
rs.open "exec pagelist 'ca_news','title,postdate,htmlurl,userid,category,id','id',"&pagesize&","¤tpage&",0,1,'"&strwhere&"'",conn,1,1
If Not (rs.bof And rs.eof) Then
arr=rs.getRows()
Else
arr=""
End If
rs.close
set rs=nothing
response.Write(UBound(arr,2))
if isarray(arr) then
For i=0 To UBound(arr,2)
title=arr(0,i)
postdate=arr(1,i)
htmlurl=arr(2,i)
userid=arr(3,i)
category=arr(4,i)
id=arr(5,i)
set rs2=conn.execute("select companyname,id from ca_companyst where userid="&userid)
if not rs2.eof then
companyname=rs2("companyname")
compid=rs2("id")
else
compid=1
companyname="清华科技网"
end if
rs2.close
set rs2=nothing
%>
<tr>
<% if htmlurl<>"" then%>
<td width="56%" height="30" class="texttit px14 bor01" >·<a href="<%=htmlurl%>" title="<%=title%>" target="_blank"><%=left(title,28)%></a></td>
<%else%>
<td width="56%" height="30" class="texttit px14 bor01" >·<a href="news_show.asp?category=<%=category%>&id=<%=id%>" title='<%=title%>' target=_blank><%=left(title,28)%></a></td>
<%end if%>
<td width="34%" align="left" class="texttit bor01"><a href=" http://company.ca800.com/index.asp?id=<%=compid%>" title="<%=companyname%>" target="_blank" class="coln">[<%=companyname%>]</a></td>
<td width="10%" align="left" class="texttit bor01"><%=datevalue(postdate)%></td>
</tr>
<%
next
end if
%>
找不出以上代码问题在那,请高手指教,现象是“数据条数已经显示,但循环不出具体资料”效果如下图: