新问题!
<!--#include file="conn.asp"--> <!--#include file="fenye1.asp"--> <% bookn=request("bookn") leibie=request("leibie") 'response.write leibie outtime=request("outtime") chubanshe=request("chubanshe") if bookn="" then response.write("关键字不能为空") else session("a")=request("bookn") bookn=session("a") end if if leibie="所有" and outtime="所有" and chubanshe="所有" then sql="select * from allbook where bookname = '"&bookn&"' or bookname like '%bookn%' order by id desc" set rs=server.createobject("adodb.recordset") rs.open sql,conn,1,1 if rs.recordcount=0 then closers response.write("对不起,没有你要找的记录!<br>") response.write "返回" else funye 'response.write("yes") '改为分页程序就可以了,建议用包含 end if elseif leibei<>"所有" and outtime="所有" and chubanshe="所有" then sql1="select * from allbook where leibie= '"&leibie&"' and bookname = '"&bookn&"' or bookname like '%bookn%'order by id desc" set rs=server.createobject("adodb.recordset") rs.open sql1,conn,1,1 if rs.recordcount=0 then closers response.write("对不起,没有你要找的记录!<br>") response.write "返回" else funye 'response.write("yes") end if elseif leibei<>"所有" and outime<>"所有"and chubanshe="所有" then sql2="select * from allbook where leibie= '"&leibie&"' and outtime='"&outtime&"' and bookname = '"&bookn&"' or bookname like '%bookn%'order by id desc" set rs=server.createobject("adodb.recordset") rs.open sql2,conn,1,1 if rs.recordcount=0 then closers response.write("对不起,没有你要找的记录!<br>") response.write "返回" else funye 'response.write("yes") end if elseif leibei<>"所有" and outime<>"所有"and chubanshe<>"所有" then sql3="select * from allbook where leibie= '"&leibie&"' and outtime='"&outtime&"' and chubanshe='"&chubanshe&"' and bookname = '"&bookn&"' or bookname like '%bookn%'order by id desc" set rs=server.createobject("adodb.recordset") rs.open sql3,conn,1,1 if rs.recordcount=0 then closers response.write("对不起,没有你要找的记录!<br>") response.write "返回" else funye 'response.write("yes") end if elseif leibei="所有" and outime<>"所有"and chubanshe="所有" then sql4="select * from allbook where outtime='"&outtime&"' and bookname = '"&bookn&"' or bookname like '%bookn%'order by id desc" set rs=server.createobject("adodb.recordset") rs.open sql4,conn,1,1 if rs.recordcount=0 then closers response.write("对不起,没有你要找的记录!<br>") response.write "返回" else funye 'response.write("yes") end if elseif leibei="所有" and outime<>"所有"and chubanshe<>"所有" then sql5="select * from allbook where outtime='"&outtime&"' and chubanshe='"&chubanshe&"' and bookname = '"&bookn&"' or bookname like '%bookn%'order by id desc" set rs=server.createobject("adodb.recordset") rs.open sql5,conn,1,1 if rs.recordcount=0 then closers response.write("对不起,没有你要找的记录!<br>") response.write "返回" else funye 'response.write("yes") end if elseif leibei="所有" and outime="所有"and chubanshe<>"所有" then sql6="select * from allbook where chubanshe='"&chubanshe&"' and bookname = '"&bookn&"' or bookname like '%bookn%'order by id desc" set rs=server.createobject("adodb.recordset") rs.open sql6,conn,1,1 if rs.recordcount=0 then closers response.write("对不起,没有你要找的记录!<br>") response.write "返回" else funye 'response.write("yes") end if end if %> <% sub closers rs.close set rs=nothing end sub%> 为什么我运行第二页就提示:关键字不能为空对不起,没有你要找的记录! 返回 |