
求助:asp在最近2天的新闻后加new图标的问题!
<%SubnewsList(ID,num,zs)setrs=server.CreateObject("adodb.recordset")rs.open"select*fr...
<%
Sub newsList(ID,num,zs)
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from news where sort="&id&" order by id desc",conn,1,1
if (rs.eof and rs.bof) then
response.Write("<tr><td height=60> 暂时没有相关信息!</td></tr>")
else
i=0
do while not rs.eof
%>
<tr>
<td width="19" height="18">◇</td>
<td width="371">
<a href="newshow.asp?id=<%=rs("id")%>"><%=cutStr(rs("title"),zs)%></a>
<%
if ID>15 then
if i<2 then
%>
<img src="images/news.gif" width="28" height="11" border="0" />
<%
end if
end if
%>
</td>
</tr>
<%
i=i+1
if i>=num then exit do
rs.movenext
loop
end if
rs.close
set rs=nothing
end Sub
%>
哪位高手能帮我修改一下,得到一个完整的程序,我只有这么几分了全部给你们,希望大家帮忙。谢谢。谢谢。 展开
Sub newsList(ID,num,zs)
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from news where sort="&id&" order by id desc",conn,1,1
if (rs.eof and rs.bof) then
response.Write("<tr><td height=60> 暂时没有相关信息!</td></tr>")
else
i=0
do while not rs.eof
%>
<tr>
<td width="19" height="18">◇</td>
<td width="371">
<a href="newshow.asp?id=<%=rs("id")%>"><%=cutStr(rs("title"),zs)%></a>
<%
if ID>15 then
if i<2 then
%>
<img src="images/news.gif" width="28" height="11" border="0" />
<%
end if
end if
%>
</td>
</tr>
<%
i=i+1
if i>=num then exit do
rs.movenext
loop
end if
rs.close
set rs=nothing
end Sub
%>
哪位高手能帮我修改一下,得到一个完整的程序,我只有这么几分了全部给你们,希望大家帮忙。谢谢。谢谢。 展开
1个回答
展开全部
就一个时间差而已,detediff("d",你新闻的时间,当前时间)
楼上已经给代了,就是这样,
楼上已经给代了,就是这样,

2023-12-06 广告
在新设备(或卸载重装)登录时,服务器记录的漫游消息将自动同步到客户端SDK。消息漫游默认是关闭的,打开方式:登录云信控制台 > 选择[应用] > 基础功能 > 消息漫游。...
点击进入详情页
本回答由网易云信提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询