asp编程问题:跳转到上一篇
Set rs_last=conn.execute("select * from news where cid<"&id&"") 比如当前&id为550,如何修改上述语句,让其跳转到449?
Set rs_last=conn.execute("select * from news where cid<"&id&"") 比如当前&id为550,如何修改上述语句,让其跳转到449?
答案:select top 1 * from news where cid<"&id&" order by cid desc"
取第一条,且是以CID排的倒序,这样做能实现 的啊,如果499这条被删除了,就可以取到498这条的
其他:Set rs_last=conn.execute("select * from news where cid<"&(id-1)&"")