if request("pinyin")<>"" then
condition1=" and 字段1='"&request("pinyin")&"'"
else
condition1=""
end if
if request("collectname")<>"" then
condition2=" and 字段2='"&request("collectname")&"'"
else
condition2=""
end if
Query="select * from login where 1=1 "+condition1+ condition2+conditon3+condition4
condition1=" and 字段1='"&request("pinyin")&"'"
else
condition1=""
end if
if request("collectname")<>"" then
condition2=" and 字段2='"&request("collectname")&"'"
else
condition2=""
end if
Query="select * from login where 1=1 "+condition1+ condition2+conditon3+condition4
condition1="字段1='"&request("pinyin")&"'"
else
condition1="1=1"
end if
if request("collectname")<>"" then
condition2="字段2='"&request("collectname")&"'"
else
condition2="1=1"
end if
condition1=condition1 & iif(request("pinyin")="","",condition2=" and 字段2='"& request("collectname")&"'")
if condition1<>"" then condition1=" where " & mid(condition1,6)
Query="select * from login" & condition1