老师您好!我把前部分set rs1=server.CreateObject("adodb.recordset")
sql1="select * from news where classid=3 order by addtime desc"
rs1.open sql1,conn,1,1
rs1.movePrevious
for i =1 to 6
if rs1.eof then
exit for
response.End
end if
rs1.movenext
next
单独运行RS1记录集可以实现去掉前5张的效果.数据库是SQL2000.
用sql2="select * from news where classid=20 union all select * from news where classid=3 and articleid>"&id
效果上面情况一样.
sql1="select * from news where classid=3 order by addtime desc"
rs1.open sql1,conn,1,1
rs1.movePrevious
for i =1 to 6
if rs1.eof then
exit for
response.End
end if
rs1.movenext
next
单独运行RS1记录集可以实现去掉前5张的效果.数据库是SQL2000.
用sql2="select * from news where classid=20 union all select * from news where classid=3 and articleid>"&id
效果上面情况一样.