惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
L
LangChain Blog
WordPress大学
WordPress大学
MyScale Blog
MyScale Blog
The Cloudflare Blog
J
Java Code Geeks
Google DeepMind News
Google DeepMind News
Recent Announcements
Recent Announcements
Microsoft Azure Blog
Microsoft Azure Blog
Y
Y Combinator Blog
有赞技术团队
有赞技术团队
Last Week in AI
Last Week in AI
酷 壳 – CoolShell
酷 壳 – CoolShell
Martin Fowler
Martin Fowler
小众软件
小众软件
量子位
月光博客
月光博客
P
Proofpoint News Feed
IT之家
IT之家
腾讯CDC
博客园 - 三生石上(FineUI控件)
博客园 - 司徒正美
雷峰网
雷峰网
V
Visual Studio Blog

博客园 - s1ihome

弹框居中的方法 如何 clone git 项目到一个非空目录 Uiautomatorviewer报错:Unexpected error while obtaining UI hierarchy java.lang.reflect.InvocationTargetException 常见银行卡号账号长度参考表 TP5.0 数据库查询is not null vscode 中sftp配置 移动端H5上传图片并压缩上传 Thinkphp关联模型使用 centos 7 pdo [转]处理上百万条的数据库如何提高处理查询速度 连接oracle读取数据 SQL SERVER批量修改表名前缀 php导出excel java开发微信公众平台备忘 AngularJS小试牛刀 spring mvc开发过程知识点记录 微信公众平台项目中遇到的小问题40016,Invalid button size Dynamic Virtual Channels 木马的隐藏方式
thinkphp 5 where 组合条件map数组or
s1ihome · 2017-07-27 · via 博客园 - s1ihome
if($inviterId>0) {
            $arr = Db::table("tablename")-> where("pid=$inviterId")->field('id')->select();
            $ids='';
            for ($i=0; $i < count($arr); $i++) { 
                $ids =$ids.','. $arr[$i]['id'];
            }
            if(\strlen($ids)>1) $ids=substr($ids,1);
            $map['inviterId']=array(['=',$inviterId],['in', $ids ],'or');
        }

直接贴代码记录以下供以后参考吧

posted on 2017-07-27 18:12  s1ihome  阅读(5932)  评论(0)    收藏  举报