tp5.1 where in 和not in写法
tp5.1 where in 和not in写法示例
//写法1: $data = array(); $data['id'] = array('in','4'); $tag = $tag->where($data)->select(); //写法2: $tag = $tag->where(array('id'=>array('in','4')))->select(); $tag = $tag->where(array('id'=>array('in',array('4'))))->select();
not in和in方法一样,in替换成not in即可
本文属原创,转载请注明原文:https://www.zhimatong.com/jiaocheng/660.html
为保证教程的实用性及扩大知识面覆盖,如果您有相似问题而未解决,可联系在线客服免费技术支持。
内容有用
热门主题
相关阅读
- ThinkPHP 5.1 缓存的创建与读取
- ThinkPHP5 查询本年、本月、本周的方法
- ThinkPHP使用update函数更新数据的方法
- ThinkPHP6多应用下路由设置
- ThinkPHP5.1图片上传后自定义图片名称和图片存储路径
- ThinkPHP页面提示Warning: require(): open_basedir restriction in effect. File的解决方法
- 中国数据API返回字符串true,判断不起作用的解决方法
- tp5中mysql查询select结果去重显示唯一数据的方法
- ThinkpPHP5.1表单多选checkbox的判断和保存传值
- thinkphp前端页面输出html
- vuejs和thinkphp结合的2种方法
- tp5.1 随机查询数据