|
6楼

楼主 |
发表于 2004-6-4 12:58:33
|
只看该作者
原来很简单问题,是我想的太复杂了
我今天终于做了出来,测试正常,以下是源码:
<!--#include file="conn.asp"--> '连接数据源
'---------------------
<%
sql="select * from dd where 字段名 order by 字段名 desc"
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
if rs.eof then
%>
<%
sum=0
su=sum+cuur(rs("字段名"))
response.write"<td bgcolor=#e8e8e8 align=center width=180><font size=2><b>已运数量</font></b></td>"
do Until rs.EOF
%>
<td bgcolor=#e8e8e8 align=center width=180><font size=2><b><%= rs("字段名") %></font></b></td>
<%
rs.movenext
loop
end if
%>
<tr>
<td bgcolor=#e8e8e8 align=center width=200><font size=2><font color=red><b>合计</font></b></td>
<td bgcolor=#e8e8e8 align=center width=180><font size=2><font color=red><b><%=sum%></font></b></td>
</tr>
<%
rs.close
conn.close
%>
此贴由 coldsummer 在 2004-06-07 15:04:15 最后编辑 |
|
|
|
|
|
|