ASP排序问题有待解决
下面代码这里sql1="Select * From "&DataFrom&" where SortID="&sID&" and ID<"&ID&"order by ID asc"当我使用order by ID asc的话就每法显示出来,不使用的话就可以显示“上一张”
function CGMenuImg1(DataFrom,ID,sID)
dim rs1,sql1
dim n
n=1
Set rs1=server.CreateObject("adodb.recordset")
sql1="Select * From "&DataFrom&" where SortID="&sID&" and ID<"&ID&"order by ID asc"
rs1.open sql1,conn,1,1
while not rs1.eof and n<2
response.Write "<a href=""#"" onclick=""javascript:window.open('OOpen.asp?ID="&rs1("ID")&"&sortID="&sID&"','newwindow','toolbars=0, location=0,statusbars=0,menubars=0,width=700,height=550,scrollbars=1 ,left=320,top=800')"">上一张</a>"
n=n+1
rs1.movenext
wend
rs1.close
set rs1=nothing
end function