【发布时间】:2019-04-19 15:04:40
【问题描述】:
我的查询运行良好,唯一的问题是这个 where 子句。请告诉我什么会在 Laravel 中查询 builder 查询,相当于这个查询
WHERE (interest_request.sender_id = 6 or interest_request.to_user_id = 6)
AND interest_request.interest_status =2
and profiles.profile_id not in (6)
我正在使用以下查询生成器,但无法正常工作
where('to_user_id',$my_profile_id)->orwhere
('sender_id',$my_profile_id)->where('interest_status','2')
->whereNotIn('profiles.profile_id', $my_profile_id)
【问题讨论】:
-
请只发布部分查询。
标签: mysql laravel laravel-5 query-builder laravel-query-builder