sub WriteLastArticle()
dim conn as SQLConnection
conn=getConn()
dim sqlCmd as SqlCommand
dim strSQL as string
dim sRead as SQLDataReader
strSQL="select top 10 * from lanmu,lanmuclass where lanmu.classid=lanmuclass.classid and lanmu.isuse='1' order by id desc"
sqlCmd=new sqlCommand(strSQL,conn)
sqlCmd.ActiveConnection.open()
sqlCmd.execute(sRead)
response.Write("<p><font color=gray>最近的文章</font></p>")
response.Write("<table border=0 width=100%>")
while(sRead.Read())
response.Write("<tr>")
response.Write("<td width=100% align=left>")
response.Write("[<a href='showarticle.asp?classid=" & sRead("classid") & "'>" & sRead("classname") & "</a>]")
response.Write("<a href='viewarticle.asp?id=" & sRead("id") & "' target='_blank'>" & sRead("title") & "</a><font color=gray size=1>" & sRead("dtime") & "</gray>")
response.Write("</td>")
response.Write("</tr>")
End While
response.Write("</table>")
end sub
sub WriteMostClick()
dim conn as SQLConnection
conn=getConn()
dim sqlCmd as SqlCommand
dim strSQL as string
dim sRead as SQLDataReader
strSQL="select top 10 * from lanmu,lanmuclass where lanmu.classid=lanmuclass.classid and lanmu.isuse='1' order by viewnum desc"
sqlCmd=new sqlCommand(strSQL,conn)
sqlCmd.ActiveConnection.open()
sqlCmd.execute(sRead)
response.Write("<p><font color=gray>最近的文章</font></p>")
response.Write("<table border=0 width=100%>")
while(sRead.Read())
response.Write("<tr>")
response.Write("<td width=100% align=left>")
response.Write("[<a href='showarticle.asp?classid=" & sRead("classid") & "'>" & sRead("classname") & "</a>]")
response.Write("<a href='viewarticle.asp?id=" & sRead("id") & "' target='_blank'>" & sRead("title") & "</a><font color=gray size=1>" & sRead("dtime") & "</gray>")
response.Write("</td>")
response.Write("</tr>")
End While
response.Write("</table>")
end sub
</script>
<html>
<head>
<title>豆腐技术站-->技术专栏</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="Description" Content="探讨ASp,Php 编程,介绍Visual Basic ,Visual C++
等业界
一起学吧部分文章转载自互联网,供读者交流和学习,若有涉及作者版权等问题请及时与我们联系,以便更正、删除或按规定办理。感谢所有提供资讯的网站,欢迎各类媒体与一起学吧进行文章共享合作。