String mon=new String();
mon = request.getParameter("mon");
int tmpmon = 0;
try
{
tmpmon = Integer.parseInt(mon);
}
catch(Exception e)
{
...
}String SQL = ......
mon = request.getParameter("mon");
int tmpmon = 0;
try
{
tmpmon = Integer.parseInt(mon);
}
catch(Exception e)
{
...
}String SQL = ......
谢谢,
我按照上面的做了,可是还是不行。
看看我写的sql没有问题吧?
再次感谢!
mon=request.getParameter("mon");
SQL="select * from monthreport1 where m_date2-m_date1>=28 and month(m_date1)=" + mon + " and month(m_date2)=" + mon;
int mon_i = Integer.parseInt(mon);
SQL="select * from monthreport1 where m_date2-m_date1>=28 and month(m_date1)=mon_i and month(m_date2)= mon_i ";
mon=request.getParameter("mon");
int mon_i = Integer.parseInt(mon);
SQL="select * from monthreport1 where m_date2-m_date1>=28 and month(m_date1)="+mon_i+" and month(m_date2)="+mon_i;