The Arcive of vBulletin Modifications Site. |
|
|
#1
|
||||
|
||||
|
I looked long and hard before posting and tried to figure out myself, but...
I have a query which works fine as follows: Code:
$dbusers = $db->query_read("
SELECT username, userid FROM " . TABLE_PREFIX . "user
WHERE usergroupid IN (" . $vbulletin->options['et_usergroupids'] . "," . $vbulletin->options['st_usergroupids'] . ")
ORDER BY username"
);
I am trying to do the query as follows, but having problems: Code:
incorrect code removed Nevermind - figured it out, i forgot to define usergroup column (doh!)... for anyone who wants to know- following works: Code:
$bit = $vbulletin->bf_ugp['scstpermissions']['canjoin_et'];
$dbusers = $db->query_read("
SELECT user.username, user.userid, usergroup.scstpermissions
FROM user
LEFT JOIN usergroup ON user.usergroupid = usergroup.usergroupid
WHERE ($bit & usergroup.scstpermissions)
ORDER BY username"
);
|
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|