public int getMpidCount(ParametersForm form){
String sql="select * from "+form.getTablename()+" where 1=1";
if(form.getType()==1){
sql=" and b.transformer_capacity>=0 and b.transformer_capacity<100";
}
}调用的时候:int aa=getMpidCount(form);
输出来的sql是:and b.transformer_capacity>=0 and b.transformer_capacity<100为什么不是整句输出呢?不是从上往下执行吗?
String sql="select * from "+form.getTablename()+" where 1=1";
if(form.getType()==1){
sql=" and b.transformer_capacity>=0 and b.transformer_capacity<100";
}
}调用的时候:int aa=getMpidCount(form);
输出来的sql是:and b.transformer_capacity>=0 and b.transformer_capacity<100为什么不是整句输出呢?不是从上往下执行吗?
解决方案 »
- struts2 错误信息怎么改成中文的
- 能不能帮我解释一下,struts配置文件 里标签的含义
- J2EE新手请进 有没有兴趣 大家一起做个J2EE项目学习学习
- 关于jsp分页问题
- 配置structs出现问题
- eclipse +MyEclipse jsp 文件无故报错.
- 新手问: EJB是不是必须和应用服务器JBoss部署在同一台机器上, 如果可以部署在不同的机器上的话, 应该如何部署?
- 当用javaxcomm编写串口通信程序时,抛出PortInUseException,why??如何解决?(急)
- 请问org.apache.jetspeed.portlet包在哪里可以下载啊,一定给分
- Spring获取SessionFactory的问题,谢谢。
- struts2数据源连接sql server2005
- 实现把表A中的记录移到表B中的最佳实现
sql+=" and b.transformer_capacity>=0 and b.transformer_capacity<100";
if(form.getType()==1){
sql=" and b.transformer_capacity>=0 and b.transformer_capacity<100";
}
------->
sql+= " and b.transformer_capacity>=0 and b.transformer_capacity<100";