Laravel Eloquent 的条件不等于
2016-10-09 23:33
1536 查看
方法一: 使用Eloquent的where
方法二: 使用Eloquent的whereNotIn
参考文献:
Eloquent - where not equal to
MySQL query: where field is not equal to some of the given values
where('id', '!=' , 2)
方法二: 使用Eloquent的whereNotIn
->whereNotIn( 'id', [2])
参考文献:
Eloquent - where not equal to
MySQL query: where field is not equal to some of the given values
相关文章推荐
- laravel 之 Eloquent 模型修改器和序列化
- Laravel数据库操作之-Eloquent ORM
- Laravel五大功能之Eloquent关系模式
- 判断Laravel Eloquent获取数据结果集是否为空
- Laravel 多条件模糊查询
- laravel读取memcached缓存并做条件查询
- oracle查询不等于条件包含null值
- 【Laravel】Eloquent ORM的底层实现
- laravel5.3-数据库操作下的局部or条件与全局or条件(orWhere的局部与全局)
- Laravel5 构造器高级查询条件写法
- Laravel Eloquent ORM的hasOne和belongsTo
- Laravel学习笔记(六)---操作数据库--Eloquent ORM(对象关系映射)
- EF和linq语句查询条件不等于某个参数出现的问题
- laravel的Eloquent模型
- 详解PHP的Laravel框架中Eloquent对象关系映射使用
- 给 CI 插上翅膀——在 CodeIgniter 2 中使用 Laravel Eloquent ORM
- 在Laravel外使用Eloquent(二)- 分页问题
- where 条件查询 星等于
- matlab 找到一个M x N矩阵中第 n列等于某条件的所有行组成新矩阵
- 输入一个数number,如果存在三个质数的和等于该数,则称是这三个质数是一组符合条件的数,请输出一共有多少组符合该条件的数?