asp多条件分页,寻求好的方法.
dim sql
sql="select * from gongzhi where 1=1"
if request("add")<>"" then
sql=sql&" and user_adder='"&request("add")&"' "
end if
if request("theyear")<>"" then
sql=sql&" and theyear="&request("theyear")&" "
end if
if request("themon")<>"" then
sql=sql&" and themon="&request("themon")
end if
if trim(request("user_name"))<>"" then
sql=sql&" and user_name='"&trim(request("user_name"))&"'"
end if
sql=sql&"and 2=2 order by id desc"
分页时,有没好的方法,不要用地址栏传参.