eq => ‘=‘ $map[‘id‘]= array(‘eq‘,‘2‘); neq => ‘<>‘ $map[‘id‘]=array(‘neq‘,2); gt => ‘>‘ $map[‘id‘]=array(‘gt‘,3); egt => ‘>=‘ $map[‘id‘]=array(‘egt‘,3); lt => ‘<‘ $map[‘id‘]=array(‘lt‘,3); elt => ‘<=‘ $map[‘id‘]= array(‘elt‘,3); 模糊查询 $map[‘username‘]=array(‘like‘,‘%b%‘); $map[‘username‘]=array(‘notlike‘,‘%b%‘); $map[‘username‘]=array(‘notlike‘,array(‘%b%‘,‘%c%‘),‘AND‘); 区间查询 $map[‘id‘]=array(‘between‘,‘1,3‘); $map[‘id‘]=array(‘between‘,array(‘1‘,‘3‘)); $map[‘id‘]=array(‘not between‘,array(‘1‘,‘3‘)); in 查询 $map[‘id‘]=array(‘in‘,array(‘1‘,‘2‘,‘3‘)); $map[‘id‘]=array(‘in‘,‘1,2,3‘); $map[‘id‘]=array(‘not in‘,‘1,2,3‘); 自定义查询 $map[‘id‘]=array(‘exp‘,‘=1‘); $map[‘id‘]=array(‘exp‘,‘>1‘); $map[‘username‘]=array(‘exp‘,‘like "%小%"‘); $map[‘username‘]=array(‘exp‘,‘not like "%小%"‘); $map[‘id‘]=array(‘exp‘,‘>1‘); $map[‘username‘]=array(‘exp‘,‘like "%bn%"‘); $map[‘email‘]=array(‘exp‘,‘like "%bn%"‘); $map[‘_logic‘]=‘OR‘;var_dump($user->where($map)->select())
时间: 2024-12-24 15:37:31