新 闻 搜 索
<% set rsSmallClass=server.CreateObject("adodb.recordset") rsSmallClass.open "Select * From SmallClass_New Where BigClassName='" & BigClass & "'",conn,1,1 if not(rsSmallClass.bof and rsSmallClass.eof) then do while not rsSmallClass.eof %> <% rsSmallClass.movenext loop end if rsSmallClass.close set rsSmallClass=nothing %>
新闻搜索  

<% Set rs= Server.CreateObject("ADODB.Recordset") if otype="title" then sql="select * from news where title Like '%"&key&"%' order by id desc" else sql="select * from news where content Like '%"&key&"%' order by id desc" end if rs.open sql,conn,1,1 if rs.eof and rs.bof then response.write "

对不起,没有找到相关新闻

" else %> <% i=0 do while not rs.eof %> <% rs.movenext i=i+1 loop %> <% end if rs.close set rs=nothing %>
ID 新闻标题 发布者 发布日期
<%=rs("id")%>  " ><%=rs("title")%> <%=left(rs("user"),5)%> <%=rs("AddDate")%>
关键字<%=key%>,共为您找到<%=i%>条新闻