if booktype <>"" then
sql=sql+"and booktype like '%"&booktype&"%'"
end if
if bookname <>"" then
sql=sql+"and bookname like '%"&bookname&"%'"
end if
if author <>"" then
sql=sql+"and author like '%"&author&"%' "
end if
if publishing <>"" then
sql=sql+"and publishing like '%"&publishing&"%' "
end if
if abstract <>"" then
sql=sql+"and abstract like '%"&abstract&"%' "
end if
sql=sql+"and bookmoney>'"&money1&"' and bookmoney <='"&money2&"' and pdate between '"&date111&"' and '"&date222&"' order by id asc"
set rs=server.createobject("adodb.recordset")
rs.open sql,db,1,3
if rs.eof or rs.bof then
response.write " <script>"&chr(13)&"alert('对不起,没有搜索到记录!');history.back();"&chr(13)&" </script>"
response.end
else
...
后面些省略了
if booktype<>"" then
sql=sql+"and booktype like '%"&booktype&"%'"
end if
if bookname<>"" then
sql=sql+"and bookname like '%"&bookname&"%'"
end if
if author<>"" then
sql=sql+"and author like '%"&author&"%' "
end if
if publishing<>"" then
sql=sql+"and publishing like '%"&publishing&"%' "
end if
if abstract<>"" then
sql=sql+"and abstract like '%"&abstract&"%' "
end if
sql=sql+"and bookmoney>'"&money1&"' and bookmoney<='"&money2&"' and pdate between '"&date111&"' and '"&date222&"' order by id asc"
set rs=server.createobject("adodb.recordset")
rs.open sql,db,1,3
if rs.eof or rs.bof then response.write "<script>alert('对不起,没有搜索到记录!');history.go(-1)</script>"
response.end
else
...
后面些省略了