<%
sql = "SELECT * FROM Accounts.dbo.view_2 where IsAndroid = 0"
set rs = conn.execute(sql)
if not rs.eof then
do while not rs.eof
userid=rs("USERID")
set rxsum=conn.execute("SELECT SUM(Score) FROM Accounts.dbo.View_3 where userid="&userid)
score=rxsum(0)
%>
<td><%=userid%></td>
<td><%=rs("ACCOUNTS")%></td>
<td><%=score%></td>
<td><%=news%></td>
<%
rs.movenext
loop
else
%>
<%=score%>這個值在循環後怎麼相加?
相加後顯示<%=news%> 這裡
<%
sql = "SELECT * FROM Accounts.dbo.view_2 where IsAndroid = 0"
set rs = conn.execute(sql)
if not rs.eof then
news=0
do while not rs.eof
userid=rs("USERID")
set rxsum=conn.execute("SELECT SUM(Score) FROM Accounts.dbo.View_3 where userid="&userid)
score=rxsum(0)
news=news+score''''''''''''
%>
<td><%=userid%></td>
<td><%=rs("ACCOUNTS")%></td>
<td><%=score%></td>
<!--<td><%=news%></td>-->
<%
rs.movenext
loop
%>
<td><%=news%></td><!--應該是放這裡吧。。你的是總計,放到同一條記錄裡面干嘛?-->
<%
else
%>