close
太過Eazy沒啥大腦寫法= =|||
<%
set rs=Nothing
Set Conn = Server.CreateObject("ADODB.connection")
DBPath = Server.MapPath("../admin/sell.mdb")
Conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath
Set rs = Server.CreateObject("ADODB.RecordSet")
Sql = "Select * From article"
rs.Open Sql, Conn, 1,1
ReDim arr_id(rs.RecordCount)
i=0
Do While not rs.Eof
i=i+1
arr_id(i) = CStr(rs("id"))
gid = CStr(request("id"))
If CStr(arr_id(i)) = CStr(gid) then
id = CStr(arr_id(i-1))
Else
id = CStr("0")
End If
rs.MoveNext
Loop
%>
<a href="xxx.asp?id=<%=id%>">上一頁</a>
<%
rs.Close
Set rs=Nothing
Conn.Close
Set Conn=Nothing
%>
全站熱搜
留言列表