数据库是Mysql吗?试试
String aaa="select * from guanyuanbiao,zhiwu where guanyuanbiao.zhiwei=zhiwu.IDzhiwu and birthday like '%10-8' order by guanyuanbiao.IDshiguan asc,guanyuanbiao.zhiwei asc";
String aaa="select * from guanyuanbiao,zhiwu where guanyuanbiao.zhiwei=zhiwu.IDzhiwu and birthday like '%10-8' order by guanyuanbiao.IDshiguan asc,guanyuanbiao.zhiwei asc";
解决方案 »
- Struts2 中文参数乱码问题后续讨论
- 如何在myeclipse上导入web项目
- 很简单的一个问题 大家帮帮忙
- apache启动又停止
- 如何学习JSP,怎样提高自己的编程能力
- JSP连oracle10g的问题
- 今天遇到的一个问题
- 如何更新jsp网站WEB-INF的 xml文件
- FLEX教程,求一份详细的教程。在线等。
- 一个javaWeb应该配一个什么样的服务器呢?
- 有没有人用过Jive?Tomcat总提示说:java.lang.ClassNotFoundException: Unable to load
- 求助!在JSP中页面的userBean中可以设置bean的session级,在servlet中怎样设置?
<%
int montha;
int datea;
int dateb;
Date now=new Date();
montha=(now.getMonth()+1);
datea=(now.getDate()); //今天的日期
dateb=(now.getDate()+5);
String dd=montha+"-"+datea;
String ee=montha+"-"+dateb;
ResultSet rs=stmt.executeQuery("select * from guanyuanbiao,zhiwu where guanyuanbiao.zhiwei=zhiwu.IDzhiwu and birthday between '"+dd+"' and '"+ee+"' order by guanyuanbiao.IDshiguan asc,guanyuanbiao.zhiwei asc");
ResultSet rs=stmt.executeQuery("select * from guanyuanbiao,zhiwu where guanyuanbiao.zhiwei=zhiwu.IDzhiwu and birthday between '1953-'+'"+dd+"' and '1953-'+'"+ee+"' order by guanyuanbiao.IDshiguan asc,guanyuanbiao.zhiwei asc");加上'1953-'符合日期型格式的就可以了,请问日期型格式的能不能改成10-8这样的,去掉前面的年份也可以的。