The Arcive of vBulletin Modifications Site. |
|
|
#1
|
||||
|
||||
|
Greettttings! I'm trying to get this working... it should pull up and display users from a secondary user group ("9") on a vB page.
Code:
$veteran_members = $db->query("
SELECT userid, usergroupid,
IF(usergroupid==9, usergroupid, usergroupid) AS usergroupid,
username, lastpostid, posts, joindate
FROM " . TABLE_PREFIX . "user AS user
ORDER BY joindate ASC
LIMIT $count
");
|
|
#2
|
|||
|
|||
|
I think you want something like this:
Code:
$groupid = 9;
$veteran_members = $db->query("
SELECT userid, usergroupid,
IF (displaygroupid=0, usergroupid, displaygroupid) AS displaygroupid,
username, lastpostid, posts, joindate
FROM " . TABLE_PREFIX . "user AS user
WHERE (FIND_IN_SET($groupid, membergroupids) OR user.usergroupid = $groupid)
ORDER BY joindate ASC
LIMIT $count
");
|
|
#3
|
||||
|
||||
|
Ladies and gentlemen...... my hero!!!!!
To anyone else who stumbles upon this, just replace the code kh99 mentioned with the code I mentioned above. Simple as that! |
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|