当前位置:网站首页>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();
}
边栏推荐
- 一个中年程序员学习中国近代史的小结
- Principle analysis of spark
- Only the background of famous universities and factories can programmers have a way out? Netizen: two, big factory background is OK
- 第一个快应用(quickapp)demo
- Oracle 11.2.0.3 handles the problem of continuous growth of sysaux table space without downtime
- Write a thread pool by hand, and take you to learn the implementation principle of ThreadPoolExecutor thread pool
- 【论文介绍】R-Drop: Regularized Dropout for Neural Networks
- 2021-07-05c /cad secondary development create arc (4)
- Explanation of suffix of Oracle EBS standard table
- 解决万恶的open failed: ENOENT (No such file or directory)/(Operation not permitted)
猜你喜欢
随机推荐
矩阵的Jordan分解实例
ORACLE EBS DATAGUARD 搭建
parser.parse_args 布尔值类型将False解析为True
IDEA2020中PySpark的两表关联(字段名相同)
ORACLE EBS中消息队列fnd_msg_pub、fnd_message在PL/SQL中的应用
使用Matlab实现:幂法、反幂法(原点位移)
Oracle EBS interface development - quick generation of JSON format data
Oracle segment advisor, how to deal with row link row migration, reduce high water level
中年人的认知科普
ORACLE APEX 21.2安装及一键部署
使用Matlab实现:Jacobi、Gauss-Seidel迭代
CRP实施方法论
mapreduce概念和案例(尚硅谷学习笔记)
RMAN增量恢复示例(1)-不带未备份的归档日志
Agile development of software development pattern (scrum)
PM2 simple use and daemon
ORACLE APEX 21.2安裝及一鍵部署
Ingress Controller 0.47.0的Yaml文件
外币记账及重估总账余额表变化(下)
优化方法:常用数学符号的含义









