Quote:
Originally Posted by kendo
Nice work!
Is it possible to include multiple usergroups in this, or just one?
|
Yes, sure. You can do it on 2 ways:
1.- Changing the "where" argument from WHERE usergroupid=2, to WHERE usergroupid=2 OR usergroupid=3 OR usergrooupid=7 . In this example we assume that you want to include members who belong to usergroups 2,3,7
2.- By using an array. At the top of the file add:
Code:
$grouparray = "2,3,7";
$groupids = explode(',',$grouparray);
Then change the "where" argument from WHERE usergroupid=2, to WHERE usergroupid IN ($groupids)
Maria