Rumah > Soal Jawab > teks badan
模糊查询
carian fungsi awam()
{
$kata kunci = trim($_POST['$kata kunci']);
$Model = M('admin');
$res=$map['username'] = array( 'suka','%'.$kata kunci .'%');
jika($res){
?????????
}lain{
????????
}
}
加特米2020-09-08 10:20:09
carian fungsi awam(){ $kata kunci = trim(I('kata kunci ')); $map['username'] = array('like','%'.$keyword .'%');
$res=M('admin') ->where($map)->select( );
jika($res){ $data['kod']=1;
$data['data']=$res;
}lainnya{ = $0 ['kod']
$data['msg']='没有数据';
}
$this->ajaxreturn($data);
}
🎜}🎜