%
' 分页显示
set rs=server.createobject("adodb.recordset")
dim lngwhichpage
dim lngpagecount
dim lngpreviouspage
dim lngnextpage
dim adoprovider
lngwhichpage=request("whichpage")
'若为空,则转换为1
if lngwhichpage="" then
lngwhichpage=1
end if
'若输入的为非字数,则转换为1
if not isnumeric(lngwhichpage) then
lngwhichpage=1
end if
lngwhichpage=cint(lngwhichpage)
if lngwhichpage<1 then
lngwhichpage=1
end if
id_type=request("id_type")
session("id_type")=id_type
strsql="select * from house where id_type='"&id_type&"' "
city=request("city")
if city<>"全部" then
strsql=strsql+" and city='"&city&"'"
end if
price=request("price")
if id_type="求租" or id_type="出租" or id_type="有房" or id_type="无房" then
if price="500" then
strsql=strsql+" and price<500"
end if
if price="1000" then
strsql=strsql+" and price>=500 and price<1000"
end if
if price="2000" then
strsql=strsql+" and price>=1000 and price<2000"
end if
if price="3000" then
strsql=strsql+" and price>=2000 and price<3000"
end if
if price="5000" then
strsql=strsql+" and price>=3000 and price<5000"
end if
if price="8000" then
strsql=strsql+" and price>=5000 and price<8000"
end if
if price="10000" then
strsql=strsql+" and price>=5000 and price<8000"
end if
if price="100000" then
strsql=strsql+" and price>=10000"
end if
end if
horse_type=request("horse_type")
if horse_type<>"全部" then
strsql=strsql+" and horse_type='"& horse_type &"'"
end if
horse_size=request("horse_size")
if horse_size<>"全部" then
strsql=strsql+" and horse_size='"&horse_size&"'"
end if
keyword=request("keyword")
if keyword<>"" then
strsql=strsql+" and (city1 like '%"&keyword&"%' or username like '%"&keyword&"%')"
end if
strsql=strsql+" order by datetime desc"
'response.write strsql
'response.end
set rs=server.createobject("adodb.recordset")
rs.open strsql, conn, 1, 1
%>