<%
dim pd
pd=" where"
area=request("area")
star=request("star")
if area="" and star <>"" then
pd=pd+"bid='"&area&"'"
elseif area<>"" and star="" then
pd=pd+"xid='"&star&"'"
else
pd=""
end if
set rs=server.createobject("adodb.recordset")
sql="select * from jianli "&pd
rs.open sql,conn,1,1
if rs.eof then
response.write "
sql="select * from jianli where bid='"&area&"'"
if strbid<>"" then
sql=sql+" and bid='"&area&"'"
end if
if strxid<>"" then
sql=sql+" and xid='"&star&"'"
end if
这段改成
sql="select * from jianli where"
if strbid<>"" and strxid<>"" then
sql=sql+" bid='"&area&"' and xid='"&star&"'"
end if
if strbid<>"" and strxid = "" then
sql=sql+" bid='"&area&"'"
end if
if strxid<>"" and strbid = "" then
sql=sql+" xid='"&star&"'"
end if
MSN:guweibeat@hotmail.com 我在日本,有问题上MSN。