在显示页面中怎样去掉数量为0的信息?
我需要显示的页面中不显示 number是0的信息
number=rs( "number ")
if number <> "0 " then
这两句代码加在下面什么位置,请指教!
<%
PageShowSize = 10 '每页显示多少个页
MyPageSize = 20 '每页显示多少条
If Not IsNumeric(Request( "page ")) Or IsEmpty(Request( "page ")) Or Request( "page ") <=0 Then
MyPage=1
Else
MyPage=Int(Abs(Request( "page ")))
End if
set rs=server.CreateObject( "ADODB.RecordSet ")
search=request( "search ")
if search <> " " then
class1=request( "class ")
keyword=request( "keyword ")
rs.Source= "select* from Store where class like '% "&class1& "% ' and pinming like '% "&keyword& "% ' order by -id "
else
rs.Source= "select* from Store order by -id "
end if
rs.Open rs.Source,conn,1,1
if not rs.EOF then
rs.PageSize = MyPageSize
MaxPages = rs.PageCount
rs.absolutepage = MyPage
total = rs.RecordCount
for i=1 to rs.PageSize
if not rs.EOF then
%>
------解决方案--------------------rs.Source= "select* from Store where class like '% "&class1& "% ' and pinming like '% "&keyword& "% ' and number <> 0 order by -id "
else
rs.Source= "select* from Store where number <> 0 order by -id "
不知道你具体的需求,但觉得这样更好