WHERE条件错在哪里
我正在做一个查询下面这段代码是要求用户输入查询条件,如果满足就打开查询结果窗口。可是现在一加where 条件就显示找不到记录,请问问题出在哪里?
<!--#include file="conn.asp"-->
<%
dim s_tsr
dim s_dh
dim s_sj
s_tsr=replace(trim(request("trs")),"'","")
s_dh=replace(trim(Request("dh")),"'","")
s_sj=replace(trim(Request("sj")),"'","")
sql="select * from tsjb where tsr='"&s_tsr&"' and dh='"&s_dh&"' and sj='"&s_sj&"'"
rs.open sql,conn,1,1
if not rs.eof then
Session("open")=True
Session("s_tsr")=s_tsr
Response.Redirect "ts_cx_list.asp"
else
response.write"no recordset"
end if
%>