+ -
当前位置:首页 → 问答吧 → 关于查询数据库表格得到的数据的sum值

关于查询数据库表格得到的数据的sum值

时间:2011-07-09

来源:互联网

rs.open sql,conn,1,1
%>
<table border="1" width="100%">
<tr>
<%for each x in rs.Fields%>
<th><%Response.Write(x.name )%></th>
  <%next%>
  </tr>

<%do until rs.EOF%>
<tr>
<%for each x in rs.Fields%>
<td><%Response.Write(x.value)%></td>
<%next
rs.MoveNext%>
</tr>
<%loop
'Response.Write(rs.recordcount)
rs.close
conn.close
%>
<tr>
<td><%Response.Write("合计")%></td>
<td><%Response.Write("合计")%></td>
<td><%Response.Write("合计")%></td>
<td><%Response.Write("合计")%></td>
<td><%Response.Write("合计")%></td>
<td><%Response.Write("合计")%></td>
<td><%Response.Write("合计")%></td>
<td><%Response.Write("合计")%></td>
<td><%Response.Write("合计")%></td>
<td><%Response.Write("合计")%></td>
<td><%Response.Write("合计")%></td>
<td><%Response.Write("合计")%></td>
<td><%Response.Write("合计")%></td>
<td><%Response.Write("合计")%></td>
<td><%Response.Write("合计")%></td>


以上内容是通过数据库里几个表格联合起来查到的数据,我想在表格的最后一栏加上总计,求正解~

作者: KONGMAJIAN   发布时间: 2011-07-09