<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*"%> <% String month=request.getParameter("month"); String title="工资报表"; String sql="SELECT * FROM tb_wage ORDER BY wageDate desc";
if(month!=null && !month.equals("")){ sql="SELECT * FROM tb_wage where wageDate='"+month+"' ORDER BY wageDate desc"; title=month+title; } System.out.println("SQL:"+sql); ResultSet rs=conn.executeQuery(sql); %>