The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Querying Usergroups Then Array Help?
I'm like really still newb when it comes to this stuff. Essentially I'm trying to pull all usergroups someone is in, primary and secondary. Then I want to display checkboxes for each group with the usergroup title next to each checkbox. So if a user is apart of 2 groups, then 2 checkboxes will appear with each usergroup name.
I'm thinking my theory is correct. I'm querying the database, then I get somewhat stumped. Won't I want to somehow put the ID's I get back in an array, and then use the array for the checkbox? Any pointers from here on out? Code:
$users = $vbulletin->db->query_read(" SELECT user.userid, user.usergroupid, user.membergroupids, usergroup.usergroupid, usergroup.title FROM " . TABLE_PREFIX . "user AS user LEFT JOIN " . TABLE_PREFIX . "usergroup AS usergroup ON(usergroup.usergroupid = user.usergroupid) WHERE user.userid = ".$vbulletin->userinfo['userid']." "); while ($user1 = $vbulletin->db->fetch_array($users)) { //checkbox stuff here like $variable = '<input type="checkbox"> blah blah? } |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|