ASP如何在同一循环纪录中,显示上一条纪录和下一条纪录。
<%setrsa=server.createobject("adodb.recordset")sqla="select*fromLiouChengwhereOT_ID="...
<% set rsa=server.createobject("adodb.recordset")
sqla="select * from LiouCheng where OT_ID="&rs("ID")&" order by ID desc"
rsa.open sqla,conn,1,1
if rsa.eof then
rsponse.write"暂无数据"
else
do while not rsa.eof
显示后一条 rsa("czy") 显示前一条
rsa.movenext
loop
end if%>
求救大神,谢谢。才五分了。 展开
sqla="select * from LiouCheng where OT_ID="&rs("ID")&" order by ID desc"
rsa.open sqla,conn,1,1
if rsa.eof then
rsponse.write"暂无数据"
else
do while not rsa.eof
显示后一条 rsa("czy") 显示前一条
rsa.movenext
loop
end if%>
求救大神,谢谢。才五分了。 展开
2个回答
推荐于2016-02-15
展开全部
<%
Set rs=Server.CreateObject("Adodb.RecordSet")
rs.Open "Select top 1 id,title,content from jok where ID<"&SmallClass&" order by id desc",conn,1,1
IF not rs.eof and not rs.bof Then
response.write"[]"
else
response.write"没"
end if
rs.close
set rs=nothing
Set rs=Server.CreateObject("Adodb.RecordSet")
rs.Open "Select top 1 id,title,content from jok where ID>"&SmallClass&" order by id asc",conn,1,1
IF not rs.eof and not rs.bof Then
response.write" []"
else
response.write" 没"
end if
rs.close
set rs=nothing%>
Set rs=Server.CreateObject("Adodb.RecordSet")
rs.Open "Select top 1 id,title,content from jok where ID<"&SmallClass&" order by id desc",conn,1,1
IF not rs.eof and not rs.bof Then
response.write"[]"
else
response.write"没"
end if
rs.close
set rs=nothing
Set rs=Server.CreateObject("Adodb.RecordSet")
rs.Open "Select top 1 id,title,content from jok where ID>"&SmallClass&" order by id asc",conn,1,1
IF not rs.eof and not rs.bof Then
response.write" []"
else
response.write" 没"
end if
rs.close
set rs=nothing%>
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
ZESTRON
2024-09-04 广告
2024-09-04 广告
在Dr. O.K. Wack Chemie GmbH,我们高度重视ZESTRON的表界面分析技术。该技术通过深入研究材料表面与界面的性质,为提升产品质量与可靠性提供了有力支持。ZESTRON的表界面分析不仅涵盖了相变化、化学反应、吸附与解吸...
点击进入详情页
本回答由ZESTRON提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询