回复 5# 的帖子
可是得有2条SQL语句,如:
set rs=server.CreateObject("adodb.recordset")
sql="select * from baby_photos order by id desc"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.Write "数据库无照片."
response.End()
else
i=0
dim page_total,pageNo,record_total,page_size
if request.QueryString("pageNo")="" or request.QueryString("pageNo")<1 then
pageNo=1
else
pageNo=request.QueryString("pageNo")
end if
page_total=rs.pagecount
page_size=1
rs.pagesize=page_size
record_total=rs.recordcount
rs.absolutepage=pageNo
j=page_size
do while not rs.eof and j>0
j=j-1
i=i+1
%>
<!--下面显示当前根据传来的ID显示的照片-->
<table width="1002" height="417" border="0" cellpadding="0" cellspacing="0">
<%
mysql="select * from baby_photos where id="&id
set myrs=conn.execute(mysql)%>
<%=myrs("add_name")%>
<img src="<%=myrs("photo_src")%>" width="310" height="297" />
................................................................
.........................................
这下有了2个记录集,而且上面已经设置了当前记录rs.absolutepage=pageNo
怎么样才能让第一个rs读取下一条呢??