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