条件“或”的查询问题!!!
我的程序要查询关于姚明,王治郅或巴特尔的相关信息,但查找结果是全部的tit信息,向各位行家请教!!
<%
on error resume next
Set conn = Server.CreateObject("ADODB.Connection")
DBPath = Server.MapPath("database/NEW123.MDB")
conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath
SET Rs = Server.CreateObject("ADODB.Recordset")
%>
<% Rs.open "Select * from article Where tit like '%姚明%' or '%王治郅%' or '%巴特尔%' ",conn,3,1
if not rs.eof then
%>
<%
do while not Rs.eof
%><img src="images/b.gif" width="18" height="18"><a href="article_view.asp?id=<%=rs("id")%>">
<%= Rs("tit") %></a>(<%= Rs("date") %>)<br>
<%
Rs.movenext
loop
end if
rs.close
set rs=noting
conn.close
set conn=nothing
%>