- var tempSZJD=getItemValue("所在街道");
- var tempSZXQ=getItemValue("所在小区");
- var tempFWLX=getItemValue("房屋类型");
- var tempJZJG=getItemValue("建筑结构");
- var tempSSSQ=getItemValue("所属社区");
- var tempCQLX=getItemValue("产权类型");
- var tempFWZK=getItemValue("房屋状况");
- var tempSFCZ=getItemValue("是否出租");
- var sql="SELECT * FROM tlk_房屋基本信息表 "
- if (tempSSSQ==null || tempSSSQ.trim().length()>0){
- sql="SELECT * FROM tlk_房屋基本信息表 where ITEM_所属社区='"+tempSSSQ+"'";
- }
- if (tempSZJD !=null && tempSZJD.trim().length()>0){
- sql=sql+" and ITEM_所在街道 like '"+"%"+tempSZJD+"%"+"'";
- }
- if (tempSZXQ !=null && tempSZXQ.trim().length()>0){
- sql=sql+" and ITEM_所在小区 like '"+"%"+tempSZXQ+"%"+"'";
- }
- if (tempJZJG !=null && tempJZJG.trim().length()>0){
- sql=sql+" and ITEM_建筑结构 = '"+tempJZJG+"'";
- }
- if (tempCQLX !=null && tempCQLX.trim().length()>0){
- sql=sql+" and ITEM_产权类型='"+tempCQLX+"'";
- }
- if (tempFWZK !=null && tempFWZK.trim().length()>0){
- sql=sql+" and ITEM_房屋状况 ='"+tempFWZK+"'";
- }
- if (tempFWLX !=null && tempFWLX.trim().length()>0){
- sql=sql+" and ITEM_房屋类型 = '"+tempFWLX+"'";
- }
- if (tempSFCZ !=null && tempSFCZ.trim().length()>0){
- sql=sql+" and ITEM_是否出租 = '"+tempSFCZ+"'";
- }
- sql;
复制代码 楼主我建议您把sql语句改成这样试试,看还会不会有问题,有问题我们再沟通! |