[Quote=引用 2 楼 zy2701 的回复:]
<%
sql="select * from table where id<>''"
if trim(request("A"))<>"" then
sql=sql&"and A="&trim(request("A"))
end if
if trim(request("B"))<>"" then
sql=sql&"and B="&trim(reque……
[/Quote]
<%
sql="select * from table where id<>''"
if trim(request("A"))<>"" then
sql=sql&"and A="&trim(request("A"))
end if
if trim(request("B"))<>"" then
sql=sql&"and B="&trim(request("B"))
end if
if trim(request("C"))<>"" then
sql=sql&"and C="&trim(request("C"))
end if
'如此往下
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1,1
......
rs.close
set rs=nothing
%>
你表达不清楚,不知是不是这种效果