asp关键字搜索的代码

来源:百度知道 编辑:UC知道 时间:2024/05/03 06:41:57
<%
set conn = Server.CreateObject("ADODB.Connection")
conn.open"DRIVER={Microsoft Access Driver (*.mdb)};DBQ="& Server.MapPath("mdb/data.mdb")
set rst = Server.CreateObject("ADODB.Recordset")
tiaojian=""
if trim(request.Form("select"))="消息动态" then
if trim(request.Form("bianhao"))<>"" then
tiaojian= tiaojian & " and title like '%"& trim(request.form("bianhao")) &"%' "
end if
end if
if trim(request.Form("select"))="专家学者" then
if trim(request.Form("bianhao"))<>"" then
tiaojian= tiaojian & " and xingming like '%"& trim(request.form("bianhao")) &"%' "
end if
end if
if trim(request.Form("select"))="企业信息" then
if trim(request.Form("b

<%
set conn = Server.CreateObject("ADODB.Connection")
conn.open"DRIVER={Microsoft Access Driver (*.mdb)};DBQ="& Server.MapPath("mdb/data.mdb")
set rst = Server.CreateObject("ADODB.Recordset")
tiaojian=""
if trim(request.Form("select"))="消息动态" then
if trim(request.Form("bianhao"))<>"" then
tiaojian= tiaojian & " and title like '%"& trim(request.form("bianhao")) &"%' "
end if
end if
if trim(request.Form("select"))="专家学者" then
if trim(request.Form("bianhao"))<>"" then
tiaojian= tiaojian & " and xingming like '%"& trim(request.form("bianhao")) &"%' "
end if
end if
if trim(request.Form("select"))="企业信息" then
if trim(request.Form("bianhao"))<>