这ASP代码哪错了?

来源:百度知道 编辑:UC知道 时间:2024/05/04 11:01:26
sjjy是表,xyjy是字段
<%
tt=request("tt")
id=split(tt,",")
id0=cint(id(0))-1
id1=cint(id(1))
idx=id1-id0
xyjy=""
set
rst=server.createobject("adodb.recordset")
sql="select * from sjjy"rst.open sql,conn,1,1
if rst.recordcount>id0
thenrst.move id0else'记录不够
end ifn=0while not rst.eof or n<idx
xyjy=xyjy+rst("xyjy")
n=n+1
rst.movenextwend
%><%=xyjy%>

<%
tt=request("tt")
id=split(tt,",")
id0=cint(id(0))-1
id1=cint(id(1))
idx=id1-id0
xyjy=""
set rst=server.createobject("adodb.recordset")'这里不能换行
sql="select * from sjjy"‘这里要换行
rst.open sql,conn,1,1
if rst.recordcount>id0 then
rst.move id0
else'记录不够
end if
n=0
while not rst.eof or n<idx
xyjy=xyjy+rst("xyjy")
n=n+1
rst.movenext
wend
%>
<%=xyjy%>
真够乱的,主要就是该换行的地方没换行,不该换行的地方换行了。