View Full Version : Quick question - SQL Query to return banned usergroups
Otaconda
10-13-2006, 03:13 PM
Hi guys.
I'm struggling to find out how I evaluate, presumably 'genericoptions' in the usergroup table, to determine if a usergroup is banned or not. Dont suppose any of you guys could point me in the right direction?
Thanks.
Otaconda
10-15-2006, 11:16 AM
Bumpski
ericgtr
10-16-2006, 04:34 PM
Can I ask why you want to use a query for this? This can easily be done with a simple template conditional.
Otaconda
10-17-2006, 07:24 AM
I want to move users to a particular user group based on inactivity. Easy enough to do with a query, but obviously this shouldnt apply to banned users. If I can determine in a query which usergroups are banned, then I can get a result set which doesn't contain members of these groups.
Adrian Schneider
10-17-2006, 07:33 AM
To get banned groups, use this (remove NOT but leave in brackets for opposite result)...$bit = $vbulletin->bf_ugp['genericoptions']['isnotbannedgroup'];
$db->query_read("
...
WHERE NOT($bit & usergroup.genericoptions)
");
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.