ASP取某一时段热门文章代码
作者:wang 日期:2009-10-12
sub top99listr(num,tnum)
yy=year(now)
mm=month(now)
da=day(now)
if da>10 then
dd=da-10
else
dd=1
end if
sqlc1="select top "&num&" * from ca_xw where day(xw_time)>"&dd&" and month(xw_time)="&mm&" order by xw_click desc"
set rsc1=server.createobject("adodb.recordset")
rsc1.open sqlc1,conn,1,1
if rsc1.eof and rsc1.bof then
Response.Write "暂无新闻"
else
do while not rsc1.eof
%>
<%
rsc1.movenext
loop
end if
rsc1.close
set rsc1=nothing
end sub
yy=year(now)
mm=month(now)
da=day(now)
if da>10 then
dd=da-10
else
dd=1
end if
sqlc1="select top "&num&" * from ca_xw where day(xw_time)>"&dd&" and month(xw_time)="&mm&" order by xw_click desc"
set rsc1=server.createobject("adodb.recordset")
rsc1.open sqlc1,conn,1,1
if rsc1.eof and rsc1.bof then
Response.Write "暂无新闻"
else
do while not rsc1.eof
%>
·" target="_blank" href="newsshow.asp?id=<%=trim(rsc1("xw_id"))%>"><%=left(trim(rsc1("xw_title")),tnum)%> <%=month(trim(rsc1("xw_time")))%>-<%=day(trim(rsc1("xw_time")))%>
<%
rsc1.movenext
loop
end if
rsc1.close
set rsc1=nothing
end sub
上一篇: ASP首页调用JS+FLASH+XML图片时候出现乱码,解决方法!
下一篇: 最简单的ASP验证码程序
文章来自: 本站原创
引用通告: 查看所有引用 | 我要引用此文章
Tags:
相关日志:
下一篇: 最简单的ASP验证码程序
文章来自: 本站原创
引用通告: 查看所有引用 | 我要引用此文章
Tags:
相关日志:
评论: 0 | 引用: 0 | 查看次数: 3063
发表评论