新闻上一篇下一篇查看
发布时间:2011-08-24 10:13:04
发布时间:2011-08-24 10:13:04
<%set rs3=jh.execute("select * from product where id="&id&"")
if not(rs3.eof and rs3.bof)then%>
<% dim pid1,pid2,sql,pid3
pid1=rs3("id")
function Getpre
sql="select top 1 * from product where id>"&pid1&" order by id"
set rs3=jh.execute(sql)
if rs3.eof and rs3.bof then
response.Write("没有新闻了")
else
pid2=rs3("id")
response.Write(""&left(rs3("biao"),15)&"...")
end if
end function
%>
<%rs3.movenext
end if
rs3.close%>
<%set rs2=jh.execute("select * from product where id="&id&"")
if not(rs2.eof and rs2.bof)then%>
<%
function Getnext
sql="select top 1 * from product where id<"&pid1&" order by id desc"
set rs2=jh.execute(sql)
if rs2.eof and rs2.bof then
response.Write("没有新闻了")
else
pid3=rs2("id")
response.Write(""&left(rs2("biao"),15)&"...")
end if
end function
%>
<%rs2.movenext
end if
rs2.close%>
上一篇:<%Getpre%> 下一篇:<%Getnext%>