t1=request.form("tiaojian1")
t1=Replace(t1,",","or") '逗号替换成OR
t2=request.form("tiaojian2")
't2=Replace(t2,",",".") '逗号替换成OR
t3=request.form("tiaojian3")
if t1="" and t2="" and t3="" then
response.Write"请选择搜索条件在提交"
response.End
else
if t1="" and t2<>"" and t3<>"" then
exec="select * from zhuku where ("&t2&") and "&t3&" order by usernames asc"
else
if t1<>"" and t2="" and t3<>"" then
exec="select * from zhuku where ("&t1&") and "&t3&" order by id asc"
else
if t1<>"" and t2<>"" and t3="" then
exec="select * from zhuku where ("&t1&") and "&t2&" order by taocan desc"
else
if t1="" and t2="" and t3<>"" then
exec="select * from zhuku where "&t3&" order by id asc"
else
if t1="" and t2<>"" and t3="" then
exec="select * from zhuku where "&t2&" order by taocan asc"
if t1<>"" and t2="" and t3="" then
exec="select * from zhuku where "&t1&" order by id asc"
else
if t1<>"" and t2<>"" and t3<>"" then
exec="select * from zhuku where (("&t1&") and "&t2&") and "&t3&" order by id asc" '只要输出这个条件就出这个错误
else
end if
end if
end if
end if
end if
end if
end if
end if
'exec="select * from zhuku where ("&t1&") "&t2&" order by id asc"
set RsMessageObj=server.createobject("adodb.recordset")
RsMessageObj.open exec,conn,1,3 '说这里错误
if RsMessageObj.eof then
response.Write "当前数据库中无记录!"
response.end
t1=Replace(t1,",","or") '逗号替换成OR
t2=request.form("tiaojian2")
't2=Replace(t2,",",".") '逗号替换成OR
t3=request.form("tiaojian3")
if t1="" and t2="" and t3="" then
response.Write"请选择搜索条件在提交"
response.End
else
if t1="" and t2<>"" and t3<>"" then
exec="select * from zhuku where ("&t2&") and "&t3&" order by usernames asc"
else
if t1<>"" and t2="" and t3<>"" then
exec="select * from zhuku where ("&t1&") and "&t3&" order by id asc"
else
if t1<>"" and t2<>"" and t3="" then
exec="select * from zhuku where ("&t1&") and "&t2&" order by taocan desc"
else
if t1="" and t2="" and t3<>"" then
exec="select * from zhuku where "&t3&" order by id asc"
else
if t1="" and t2<>"" and t3="" then
exec="select * from zhuku where "&t2&" order by taocan asc"
if t1<>"" and t2="" and t3="" then
exec="select * from zhuku where "&t1&" order by id asc"
else
if t1<>"" and t2<>"" and t3<>"" then
exec="select * from zhuku where (("&t1&") and "&t2&") and "&t3&" order by id asc" '只要输出这个条件就出这个错误
else
end if
end if
end if
end if
end if
end if
end if
end if
'exec="select * from zhuku where ("&t1&") "&t2&" order by id asc"
set RsMessageObj=server.createobject("adodb.recordset")
RsMessageObj.open exec,conn,1,3 '说这里错误
if RsMessageObj.eof then
response.Write "当前数据库中无记录!"
response.end