mysql - WHERE IN - must meet all params -
i'm conducting in query.
here's query:
select * `xh_user` (select count(*) `xh_roles` inner join `xh_role_user` on `xh_roles`.`id` = `xh_role_user`.`role_id` `xh_role_user`.`user_id` = `xh_user`.`id` , `title` in (?, ?)) >= 1 , `id` = ? limit 1'
i'm searching rows title meets params.
rows come if 1 of params met.
how can make params must met?
assuming have 2 parameters:
select * `xh_user` (select count(distinct title) `xh_roles` inner join `xh_role_user` on `xh_roles`.`id` = `xh_role_user`.`role_id` `xh_role_user`.`user_id` = `xh_user`.`id` , `title` in (?, ?) ) = 2 , `id` = ? limit 1;
Comments
Post a Comment