<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8" import="java.sql.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>用户管理</title>
<style type="text/css">
<!--
#apDiv1 {
position:absolute;
width:521px;
height:713px;
z-index:1;
left: 157px;
top: 38px;
font-color:#FFFFFF;
}
-->
    </style>
</head>
<body background="images/bg-0300.gif"><%  Connection conn=null;
Statement stmt=null;
ResultSet rs=null;
try{
String driver="sun.jdbc.odbc.JdbcOdbcDriver";
String src="jdbc:odbc:Database";

String sql="select sum(total) from SalesOrder";
Class.forName(driver);
conn=DriverManager.getConnection(src);
stmt=conn.createStatement();
rs=stmt.executeQuery(sql);

 %>
 <div id="apDiv1">
<table width="200px" align="center" border="1"  cellspacing="0px" cellpadding="1px" bordercolor="#0096e1">
   <tr bgcolor="#0096e1">
<th >月销售金额 </th>
</tr>
 <%
   while(rs.next()){
   String total=rs.getString("total");
 
  
   
   
  
  %>
  
  <tr>
     
      <td align="center"><%=total %></td>
     
       
        
         </tr>
         <%   }
         }catch(Exception e){
         e.printStackTrace();
         }finally{
         if(rs!=null)rs.close();
         if(stmt!=null)stmt.close();
         if(conn!=null)conn.close();
         }
         
          %>
         
</table>
</div>
</body>
</html>