<%
set rs=server.createobject("adodb.recordset")
sql="select * from new"
rs.open sql,conn,1,3
do while not rs.eof
%>
<% =rs("hits") %>
<%
rs.movenext
loop
rs.close
%>
现在是把全部的点击次数输出,我如何才能把全部点击次数的和输出呢?
<%
dim rs,sql,lele
lele=0
set rs=server.createobject("adodb.recordset")
sql="select hits from new"
rs.open sql,conn,1,1
do while not rs.eof
lele=lele+1
if rs.eof then exit do
rs.movenext
loop
response.write "全部点击次数的和是:" & cstr(lele)
rs.close
set rs=nothing