|
|
|
|
 |
<%
Dim CONN_STRING
CONN_STRING = Server.MapPath("..\myfile\database\table.mdb")
CONN_STRING = "driver={Microsoft Access Driver (*.mdb)};dbq=" & CONN_STRING
set conn=server.createobject("ADODB.connection")
set rs=server.createobject("ADODB.recordset")
conn.open CONN_STRING
sql = "select * from file order by id DESC"
rs.Open sql,conn,1,1
%>
 |
<%
i=0
do while not rs.eof
if rs("分类") = "科普常识" then
i=i+1
if i <= 5 then
%>
|
|
" class="blue1"><%=rs("标题")%> |
|
<%
else
exit do
end if
end if
rs.movenext
loop
%>
|
|
|
|
 |
 |
 |
|
|
|
 |
<%
i=0
rs.movefirst
do while not rs.eof
if rs("分类") = "专家答疑" then
i=i+1
if i <= 5 then
%>
|
|
" class="blue1"><%=rs("标题")%> |
|
<%
else
exit do
end if
end if
rs.movenext
loop
rs.close
set rs=nothing
%>
|
|
|
 |
 |
 |
|
|
|
|