<%
action=request.QueryString("action")
id=trim(request("id"))
oid=trim(request("orderid"))
set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from xh_about",conn,1,1
'上移
if action=1 and oid<>1 then
Conn.execute("update xh_about set xh_orderid=xh_orderid+1 where xh_orderid="&oid&"-1")
Conn.execute("update xh_about set xh_orderid=xh_orderid-1 where xh_id="&id&"")
else
'下移
if action=2 and oid<>rs.recordcount then
Conn.execute("update xh_about set xh_orderid=xh_orderid-1 where xh_orderid="&oid&"+1")
Conn.execute("update xh_about set xh_orderid=xh_orderid+1 where xh_id="&id&"")
else
end if
end if
rs.close
set rs=nothing
%>
向下移时,怎么oid=rs.recordcount时还执行
Conn.execute("update xh_about set xh_orderid=xh_orderid-1 where xh_orderid="&oid&"+1")
Conn.execute("update xh_about set xh_orderid=xh_orderid+1 where xh_id="&id&"")
???
oid=rs.recordcount这里该怎么写呢?