ASP网页程序的问题

来源:百度知道 编辑:UC知道 时间:2024/05/16 11:37:34
<%lxsql1="select * from chuanzhen order by id desc"
set rrs1=conn.execute(lxsql1)
do while not rrs1.eof %>

<%=rrs1("louhao")%>

<%rrs1.movenext
loop%>
以上是我的一个循环程序, 我想让所有循环出来的值,附给一个。
比如"louhao2= 所有值叠加"?
请高手教我怎么写,谢谢!

<%dim louhao2
louhao2=0
lxsql1="select * from chuanzhen order by id desc"
set rrs1=conn.execute(lxsql1)
do while not rrs1.eof %>

<%louhao2=louhao2+rrs1("louhao")%>

<%rrs1.movenext
loop
response.write louhao2
%>

原来已经有答案了