模糊查询
请问用ASP如何实现网站的模糊查询功能,知道的说一下,在这里先谢了!~~
<%
Set Con=Server.CreateObject("ADODB.Connection")
Con.Open="DRIVER={Microsoft Access Driver (*.mdb)}; DBQ="+server.mappath("news.mdb")
Set rs=Server.CreateObject("ADODB.RecordSet")
sql="select * from information where title like '%"&trim(request("search"))&"%' or content like '%"&trim(request("search"))&"%' or nowtime like '%"&trim(request("search"))&"%'"
rs.Open sql,Con,3,2
if not (rs.eof) then
%>
试试这个吧!