模糊查询
carian fungsi awam(){ $kata kunci = trim($_POST['$kata kunci']); $Model = M('admin'); $res=$map['username'] = array( 'suka','%'.$kata kunci .'%'); jika($res){ ????????? }lain{ ???????? }}
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);
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);
}
🎜}🎜