mysql - check if user belong to multiple groups in where clause

mirceat

Member
Hello,

I need to check if a user belong to multiple groups in Where condition for a dbjoin element using "case when then" or "if else..".

something like:

Code:
select ID from my_table where field IN 
(case '{$my->group}' 
when (101 or  27) and 135 then 82 
when 101  then 71 
when 27 then 62
...
end)

The website use Active Directory to map the users to groups with ID 101 or 27. Users are manually added to group_id = 135 by an administrator.

Thank you
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top