当前位置:编程学习 > JSP >>

jsp 关键字模糊查询代码

网页特效p/网页特效p.html target=_blank >jsp教程 关键字模糊查询代码

public page<adtesify> getpage(page<adtesify> page, string searchkey,int flowstatus){
         criterion cri;
        if(flowstatus==-1)
           {
               cri =restrictions.like(adtesify.pro_content, searchkey, matchmode.anywhere);
           }
           else{
               cri = restrictions.and(restrictions.like(adtesify.pro_content, searchkey, matchmode.anywhere),
                       restrictions.eq(adtesify.pro_flowstatus, flowstatus)     
                                     );
           }
        return adtesifydao.findpage(page,cri);
    }


现在这个只是实现按关键字(content)查询

补充:Jsp教程,Java基础 
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,