?? captial_statistic.jsp
字號(hào):
<%@ page contentType="text/html; charset=gb2312" %>
<%@ page language="java" import="java.sql.*"%>
<%@ page import="java.util.Date,java.text.SimpleDateFormat" %>
<html>
<style TYPE="text/css">
<!--
body {font-size:10pt;color:#415161}
td {font-size:10pt;color:#415161}
th {font-size:10pt;color:#415161}
</style>
<jsp:useBean id="j" scope="application" class="jdbc.jdbc"/>
<%
SimpleDateFormat df=new SimpleDateFormat("yyyy");
String date=df.format(new Date());
%>
<table width="100%" border="1" cellspacing="0" bordercolor="#CCCCFF">
<tr bgcolor="#CCCCFF">
<td width="47%"><div align="center"><strong>企業(yè)名稱</strong></div></td>
<td width="14%"><div align="center"><strong>注冊(cè)資金</strong></div></td>
<td width="14%"><div align="center"><strong>投資總額</strong></div></td>
<td width="25%"><div align="center"><strong>企業(yè)地址</strong></div></td>
</tr>
<%
String captial=new String(request.getParameter("captial").getBytes("ISO8859_1"), "GBK");
String compare=new String(request.getParameter("compare").getBytes("ISO8859_1"), "GBK");
String co;
if(compare.equals("more"))
{co=">=";}
else
{co="<=";}
try{
Connection con=j.getConnection();
Statement statement=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
String sql="select * from enterprise_info where capital "+co+" '"+captial+"' and year_time='"+date+"'";
ResultSet r=statement.executeQuery(sql);
if(!r.first())
response.sendRedirect("../nomessage.htm");
r.beforeFirst();
while(r.next())
{
%>
<tr>
<td><%=r.getString(1)%></td>
<td><%=r.getString(3)%></td>
<td><%=r.getString(8)%></td>
<td><%=r.getString(4)%></td>
</tr>
<%
}
}catch(SQLException ee){out.print("數(shù)據(jù)庫(kù)連接失敗!");}
%>
</table>
</html>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -