php+ajax实时输入自动搜索匹配的方法(2)

public function gwquery1(){//之前备份。。 
    if($_POST){ 
    $zm = $_POST['data']; 
    $wzm = $zm."%"; 
    $b = M('Wpindexgw'); 
    $list = $b->where("gwstatus=1 and gwname like '$wzm'")->order("time desc")->select(); 
    //dump($list); 
    if($list){ 
    $this->ajaxReturn($list,'success',1); 
    }else{ 
        $this->error("Bestiary not found."); 
        } 
    } 
}

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/7cfd7de0f60eb56ce67ab56da754f6c4.html