<%
lx=request("lx")
key=trim(request("key"))
if key="" then
response.write("请输入需要搜索的关健字")
else
Set rs=Server.CreateObject("ADODB.Recordset")
if lx=1 then
sql="select * from art where tit like '%"& key &"%'"
else
sql="select * from art where con like '%"& key &"%'"
end if
rs.open sql,conn,1,3
if rs.eof and rs.bof then
Response.write "没有找到相关内容"
else
%>
<table width="98%" height="24">
<% do while not rs.EOF %>
<tr>
<td><%=rs("tit")%></td>
<td><%=rs("dat")%></td>
</tr>
<%
rs.movenext
loop
%>
</table>
<%
end If
end If
%>
模糊搜索
最新推荐文章于 2021-02-06 06:52:03 发布