[求助]每行数据前增加一个自增的编号
<table>
<tr><br>
<td width="50">编号</td>
<td width="260">企业名称</td>
<td width="180">企业注册时间</td>
</tr>
<%set rs=server.createobject("adodb.recordset")
sql="SELECT TOP 50 * FROM yp ORDER BY id DESC"
rs.open sql,conn,1,1
do while not rs.eof
qyname1=trim(rs("smt_coname"))
astring1=qyname1
qyname3=trim(rs("smt_date"))
astring3=qyname3
listnum=50
Rs.pagesize=listnum
page = 1
Rs.absolutepage=page
'编号的实现
j=rs.recordcount
j=j-(page-1)*listnum
i=0
nn=request("page")
if nn="" then
n=0
else
nn=nn-1
n=listnum*nn
end if
%>
<%do while not rs.eof and i<listnum
n=n+1%>
<tr>
<td><%=n%></td>
<td><%=astring1%></td>
<td><%=astring3%></td>
</tr>
<tr>
</tr>
<%rs.movenext
i=i+1
j=j-1
loop
loop
rs.close%>
</table>
<tr><br>
<td width="50">编号</td>
<td width="260">企业名称</td>
<td width="180">企业注册时间</td>
</tr>
<%set rs=server.createobject("adodb.recordset")
sql="SELECT TOP 50 * FROM yp ORDER BY id DESC"
rs.open sql,conn,1,1
do while not rs.eof
qyname1=trim(rs("smt_coname"))
astring1=qyname1
qyname3=trim(rs("smt_date"))
astring3=qyname3
listnum=50
Rs.pagesize=listnum
page = 1
Rs.absolutepage=page
'编号的实现
j=rs.recordcount
j=j-(page-1)*listnum
i=0
nn=request("page")
if nn="" then
n=0
else
nn=nn-1
n=listnum*nn
end if
%>
<%do while not rs.eof and i<listnum
n=n+1%>
<tr>
<td><%=n%></td>
<td><%=astring1%></td>
<td><%=astring3%></td>
</tr>
<tr>
</tr>
<%rs.movenext
i=i+1
j=j-1
loop
loop
rs.close%>
</table>
编号是出来了,可是为什么每行数据都是一样的?