接受yms的建议,我用了阳光白雪的方法,同时也借签了guyer的程序
if cq="" and zb="" and price="" and key="" then
sql ="select * from places order by id desc"
SearchStr = SearchStr &"&cq="&cq&"&zb="&zb&"&price="&price
elseif (cq<>"" and key="") or (zb<>"" and key="") or (price<>"" and key="") then
sql ="select * from places where cq like '%" & cq & "%' and zb like '%" & zb & "%' and price like '%" & price & "%' order by id desc"
SearchStr = SearchStr &"&cq="&cq&"&zb="&zb&"&price="&price
else if key<>""
sql ="select * from places where cq like '%" & cq & "%' and zb like '%" & zb & "%' and price like '%" & price & "%' and name like '%" & key & "%'......order by id desc"
SearchStr = SearchStr &"&cq="&cq&"&zb="&zb&"&price="&price&"key="&key
<a href="search.asp?page=<%=currentpage+1%>
<%=SearchStr%> ">下一页</a>
把红色部份插到每个链接处,就解决问题了。