标题:求助,如何加双重条件输出结果呢? 在所选xb(县别),总投资又是大于10000的 ...
取消只看楼主
gw3036941
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2011-9-1
 问题点数:0 回复次数:0 
求助,如何加双重条件输出结果呢? 在所选xb(县别),总投资又是大于10000的。
程序代码:
  </tr>
  <tr>
    <td width="13%" rowspan="3" align="center" bgcolor="#FFFFFF">县区</td>
    <td width="8%" rowspan="3" align="center" bgcolor="#FFFFFF">总投资</td>
    <td width="8%" rowspan="3" align="center" bgcolor="#FFFFFF">项目<br>
个数</td>
    <td width="71%" colspan="10" align="center" bgcolor="#FFFFFF">分段统计</td>
  </tr>
  <tr>
    <td colspan="2" align="center" bgcolor="#FFFFFF">1亿元以下</td>
    <td colspan="2" align="center" bgcolor="#FFFFFF">1-10亿元</td>
    <td colspan="2" align="center" bgcolor="#FFFFFF">10-50亿元</td>
    <td colspan="2" align="center" bgcolor="#FFFFFF">50-100亿元</td>
    <td colspan="2" align="center" bgcolor="#FFFFFF">100亿元以上</td>
  </tr>
  <tr>
    <td align="center" bgcolor="#FFFFFF">总投资</td>
    <td align="center" bgcolor="#FFFFFF">项目<br>
个数</td>
    <td align="center" bgcolor="#FFFFFF">总投资</td>
    <td align="center" bgcolor="#FFFFFF">项目<br>
个数</td>
    <td align="center" bgcolor="#FFFFFF">总投资</td>
    <td align="center" bgcolor="#FFFFFF">项目<br>
个数</td>
    <td align="center" bgcolor="#FFFFFF">总投资</td>
    <td align="center" bgcolor="#FFFFFF">项目<br>
个数</td>
    <td align="center" bgcolor="#FFFFFF">总投资</td>
    <td align="center" bgcolor="#FFFFFF">项目<br>
个数</td>
  </tr>
  <tr>
    <td align="center" bgcolor="#E9FFCA"><strong>合计</strong></td>
    <td align="center" bgcolor="#E9FFCA"><div align="center"><strong><%=Formatnumber(sums("ztz","all"),-1,-1,-1,0)%></strong></div></td>
    <td align="right" bgcolor="#E9FFCA"><div align="center"><strong><%=allr("all")%></strong></div></td>
    <td align="right" bgcolor="#E9FFCA"><div align="center"><%=formatnumber(sums("ztz","ztz<10000"),-1,-1,-1,0)%></div></td>
    <td align="right" bgcolor="#E9FFCA"><div align="center"><%=allr("ztz<10000")%></div></td>
    <td align="right" bgcolor="#E9FFCA"><div align="center"><%=formatnumber(sums("ztz","ztz>=10000 and  ztz<100000"),-1,-1,-1,0)%></div></td>
    <td align="right" bgcolor="#E9FFCA"><div align="center"><%=allr("ztz>=10000 and  ztz<100000")%></div></td>
    <td align="right" bgcolor="#E9FFCA"><div align="center"><%=Formatnumber(sums("ztz","ztz>=100000 and  ztz<500000"),-1,-1,-1,0)%></div></td>
    <td align="right" bgcolor="#E9FFCA"><div align="center"><%=allr("ztz>=100000 and  ztz<500000")%></div></td>
    <td align="right" bgcolor="#E9FFCA"><div align="center"><%=Formatnumber(sums("ztz","ztz>=500000 and  ztz<1000000"),-1,-1,-1,0)%></div></td>
    <td align="right" bgcolor="#E9FFCA"><div align="center"><%=allr("ztz>=500000 and  ztz<1000000")%></div></td>
    <td align="right" bgcolor="#E9FFCA"><div align="center"><%=formatnumber(sums("ztz","ztz>=1000000"),-1,-1,-1,0)%></div></td>
    <td align="right" bgcolor="#E9FFCA"><div align="center"><%=allr("ztz>=1000000")%></div></td>
  </tr> <%set rss=server.CreateObject("adodb.recordset")
  rss.open "select * from project where ztz>=1000000",conn,1,1
  %><%
  rss.close%> <%set rss=server.CreateObject("adodb.recordset")
  rss.open "select * from project where ztz>=500000 and  ztz<1000000",conn,1,1
  %><%
  rss.close%> <%set rss=server.CreateObject("adodb.recordset")
  rss.open "select * from project where ztz>=100000 and  ztz<500000",conn,1,1
  %><%
  rss.close%> <%set rss=server.CreateObject("adodb.recordset")
  rss.open "select * from project where ztz>=10000 and  ztz<100000",conn,1,1
  %><%
  rss.close%><%set rss=server.CreateObject("adodb.recordset")
  rss.open "select * from project where ztz<10000",conn,1,1
  %><%
  rss.close%> <%set rss=server.CreateObject("adodb.recordset")
  rss.open "select distinct xb from project",conn,1,1
  do until rss.eof%>
  <tr>
    <td align="center" bgcolor="#FFFFFF"><%=rss("xb")%></td>
    <td align="center" bgcolor="#FFFFFF"><div align="center"><%=formatnumber(sums("ztz","xb='"&rss("xb")&"'"),-1,-1,-1,0)%></div></td>
    <td align="right" bgcolor="#FFFFFF"><div align="center"><%=allr("xb='"&rss("xb")&"'")%></div></td>
    <td align="right" bgcolor="#FFFFFF"><div align="center"><%=formatnumber(sums("ztz","ztz<10000","xb='"&rss("xb")&"'"),-1,-1,-1,0)%></div></td>
    <td align="right" bgcolor="#FFFFFF"><div align="center"><%=allr("ztz<10000","xb='"&rss("xb")&"'")%></div></td>
    <td align="right" bgcolor="#FFFFFF"><div align="center"><%=formatnumber(sums("ztz","ztz>=10000 and  ztz<100000","xb='"&rss("xb")&"'"),-1,-1,-1,0)%></div></td>
    <td align="right" bgcolor="#FFFFFF"><div align="center"><%=allr("ztz>=10000 and  ztz<100000","xb='"&rss("xb")&"'")%></div></td>
    <td align="right" bgcolor="#FFFFFF"><div align="center"><%=formatnumber(sums("ztz","ztz>=100000 and  ztz<500000","xb='"&rss("xb")&"'"),-1,-1,-1,0)%></div></td>
    <td align="right" bgcolor="#FFFFFF"><div align="center"><%=allr("ztz>=100000 and  ztz<500000","xb='"&rss("xb")&"'")%></div></td>
    <td align="right" bgcolor="#FFFFFF"><div align="center"><%=formatnumber(sums("ztz","ztz>=500000 and  ztz<1000000","xb='"&rss("xb")&"'"),-1,-1,-1,0)%></div></td>
    <td align="right" bgcolor="#FFFFFF"><div align="center"><%=allr("ztz>=500000 and  ztz<1000000","xb='"&rss("xb")&"'")%></div></td>
    <td align="right" bgcolor="#FFFFFF"><div align="center"><%=formatnumber(sums("ztz","ztz>=1000000","xb='"&rss("xb")&"'"),-1,-1,-1,0)%></div></td>
    <td align="right" bgcolor="#FFFFFF"><div align="center"><%=allr("ztz>=1000000","xb='"&rss("xb")&"'")%></div></td>
  </tr>
   <%rss.movenext
  loop
  rss.close%>
  <tr>
    <td colspan="13" align="right" bgcolor="#E9FFCA"><a href="javascript:window.print();">打印</a>】 【<a href="javascript:doZoom(16)"></a> <a href="javascript:doZoom(14)"></a> <a href="javascript:doZoom(12)"></a>】 【<a href="Javascript:history.back('1')">后退</a>】 【<a href="Javascript:history.back('-1')">前进</a>】 【<a href="javascript:window.close()">关闭</a>】 【<a href="javascript:history.go('0')">刷新</a>】 【<a href="main.asp">返回首页</a></td>
    </tr>
</table>
</body>

</html>
源代码 如上,在红色的部分,是我加了条件后,不知道该怎么再增加语句了, 能得到想要的条件。。。

如图
搜索更多相关主题的帖子: 如何 
2011-09-01 20:45



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-348902-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.099502 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved