我在本地测试时发现5.0企业空间中的产品展示和公司动态页面查出来的数据都少一条,于是看了看程序,我把Space目录下面的product.asp和News.asp改了一下(修改行数分别是产品:149和152;公司动态:145。都是将N>=Total改为N>Total),发现没事了。我猜想是否其他有分页的数据是否也有此问题,请查看。
Sub ShowProduct(SQL)
Dim I,K,N,Total,PhotoUrl
Total=Ubound(SQL,2)
For I=0 To Total
Str=Str &"<tr>"
For K=1 To 4
PhotoUrl=SQL(2,N)
If PhotoUrl="" Or IsNull(PhotoUrl) Then PhotoUrl="../images/nophoto.gif"
Str=Str & "<td align='center'>"
Str=Str & "<a href='Show_Product.asp?username=" & username & "&id=" & sql(0,n) & "' target='_blank'><Img border='0' src='" & PhotoUrl & "' width='130' height='90'></a><div style='text-align:center'><a href='ShowProduct.asp?username=" & username & "&id=" & sql(0,n) & "'>" & SQL(1,N) & "</a></div>"
Str=Str & "</td>"
N=N+1
If N>Total Or N>=MaxPerPage Then Exit For
Next
Str=Str &"</tr>"
If N>Total Or N>=MaxPerPage Then Exit For
Next
End Sub
Sub ShowProduct(SQL)
Dim I,K,N,Total
Total=Ubound(SQL,2)
For I=0 To Total
Str=Str &"<tr>"
Str=Str & "<td style=""border-bottom: #efefef 1px dotted;height:22""><img src='../images/arrow_r.gif' align='absmiddle'> <a href='Show_News.asp?username=" & username & "&id=" & sql(0,n) & "' target='_blank'>" & SQL(1,N) & "</a> " & sql(2,n)
Str=Str & "</td>"
N=N+1
If N>Total Or N>=MaxPerPage Then Exit For
Str=Str &"</tr>"
Next
End Sub