这是 查询页面的代码:适应人群:</span>
<%
set rs=server.createobject("adodb.recordset")
sql = "select * from class1"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "请先添加栏目。"
response.end
else
%> <select name="typeid" onChange="changelocation(document.myform.typeid.options[document.myform.typeid.selectedIndex].value)" size="1">
<option selected value="">==请选人群==</option><%
do while not rs.eof
%> <option value="<%=rs("Class1ID")%>"><%=rs("Class1")%></option> <%
rs.movenext
loop
end if
rs.close%></select>
<span class="style2"> <span class="style1">产品类别</span></span>:
<select name="ntypeid"><option selected value=>==请选类别==</option></select>
<input type="submit" name="Submit" value="搜索">
这是进行模糊查询的语句:
<%
Rq=request.Form("typeid")
Lb=request.Form("ntypeid")
sql="select * from yao where Rq<>''"
if Rq<>"" then
sql=sql & " and (Rq like '%"&Rq&"%')"
end if
if Lb<>"" then
sql=sql & " and (Lb like '%"&Lb&"%')"
end if
session("chaxun_jilu")=sql
response.Redirect("infoquery1.asp")
%>
麻烦您们帮我看看那有问题呀?? 谢谢了各位