I want to select a list of users that have a certain membergroupid
Code:
SELECT username
FROM vb_user
WHERE membergroupids = '9'
LIMIT 0 , 30
The code works when the user only has one additional group assigned, but most of my users have 5 groups assigned. The content in the database looks like: 5,7,9,10
So how can I make sure I also select those with multiple usergroups?
--------------- Added [DATE]1201523929[/DATE] at [TIME]1201523929[/TIME] ---------------
@the one that posted a reply earlier:
This selects it only if the membergroupids start with 5. But it helped me, I've added everyone to the registered members group, and expanded it to
WHERE membergroupids IN (2 , 5 , 7 )
Thank you.