当前位置:网站首页>One field in thinkphp5 corresponds to multiple fuzzy queries
One field in thinkphp5 corresponds to multiple fuzzy queries
2022-07-02 07:19:00 【Snow wind in the night sky】
Preface
Recently, I encountered a query condition when developing a project : You need to perform multiple fuzzy queries on a field .
terms of settlement
public function getGroupUser($title)
{
// Multiple where Conditions of the query
$condition = [' Construction unit ',' construction control unit ',' Digital unit '];
$where_supervisor['title'] = array('or');
foreach ($condition as $value) {
array_unshift($where_supervisor['title'], array('like', '%' . $value . '%'));
}
// Splice search criteria
$query = self::where($where_supervisor);
return $query->order('key desc')->select();
}
边栏推荐
- The boss said: whoever wants to use double to define the amount of goods, just pack up and go
- Go common compilation fails
- ORACLE APEX 21.2安裝及一鍵部署
- Pratique et réflexion sur l'entrepôt de données hors ligne et le développement Bi
- oracle apex ajax process + dy 校验
- JSP智能小区物业管理系统
- Oracle rman自动恢复脚本(生产数据向测试迁移)
- Oracle segment advisor, how to deal with row link row migration, reduce high water level
- allennlp 中的TypeError: Object of type Tensor is not JSON serializable错误
- Explain in detail the process of realizing Chinese text classification by CNN
猜你喜欢
随机推荐
Oracle rman自动恢复脚本(生产数据向测试迁移)
Oracle RMAN automatic recovery script (migration of production data to test)
Three principles of architecture design
Two table Association of pyspark in idea2020 (field names are the same)
DNS attack details
Practice and thinking of offline data warehouse and Bi development
Sqli Labs clearance summary - page 2
【模型蒸馏】TinyBERT: Distilling BERT for Natural Language Understanding
如何高效开发一款微信小程序
实现接口 Interface Iterable<T>
ARP攻击
ssm超市订单管理系统
Check log4j problems using stain analysis
Basic knowledge of software testing
User login function: simple but difficult
数仓模型事实表模型设计
ORACLE 11G利用 ORDS+pljson来实现json_table 效果
ORACLE APEX 21.2安裝及一鍵部署
php中判断版本号是否连续
Error in running test pyspark in idea2020