-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[6.0.12 LTS]Db where生成的语句有误,指定in还是变成= #1114
Comments
邮箱已收到,谢谢你的支持,祝你生活愉快~~=================================杨怀桂手机:13698971401
|
wuyifan66
changed the title
Db where生成的语句有误,指定in还是变成=
[6.0.12 LTS]Db where生成的语句有误,指定in还是变成=
Sep 3, 2022
这个写法建议用whereExp方法查询 in查询默认会自动识别 如果不是数组 就不用会用in |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Db::table('think_user')
->where('id', 'IN', function ($query) {
$query->table('think_profile')->where('status', 1)->field('id');
})
->select();
这个查询的不是in,是=,怎么解决
同样
Db::table('think_user')
->where('id', 'IN', '(select user_id from think_vips)')
->select();
生成的语句为 select * from think_user where id = (select user_id from think_vips)
预期的则是 select * from think_user where id in (select user_id from think_vips)
The text was updated successfully, but these errors were encountered: