MyBB Community Forums

Full Version: Help to Edit this additional usergroup querry
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
$query = $db->simple_select("usergroups", "*", "gid IN (".$mybb->user['additionalgroups'].") AND gid !='".$mybb->user['usergroup']."'", array('order_by' => 'title'));

I'd like to edit this to exclude certain usergroups. I believe I need an array to do so but not quite sure where.

So if I need to exclude user group 7,8,9 and 10. How should I re-write?

Thanks
Well, you can just add another NOT IN..:
$query = $db->simple_select("usergroups", "*", "gid IN (".$mybb->user['additionalgroups'].") AND gid NOT IN('7','8','9','10') AND gid !='".$mybb->user['usergroup']."'", array('order_by' => 'title'));
Thankyou, worked perfectly.....exactly what I needed Smile