The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
SQL Query to get list of all users
Hi there,
I need to create a list of all users that belong to a certain usergrup, in order to make a comma-separated list. I found this, but it doesn't seem to work: https://vborg.vbsupport.ru/showthread.php?t=256215 any idea? |
#2
|
||||
|
||||
in phpmyadmin run the SQL Query:
Code:
SELECT username FROM user WHERE usergroupid = 2 ORDER BY username 2 is the registered users usergroup, change it to whatever usergroup you want. ORDER BY username will make it alphabetical... change it to ORDER BY userid if you prefer the order in which they joined. In phpmyadmin there is an option to export your results as a csv file. |
#3
|
|||
|
|||
Cool, thanks. but i just noticed YAAS doesn't support multi-user selection. I want to assign an award to all the users of the usergroup 2
the tables i have to work on are award_user.award_id and award_user.userid the thing i want to reproduce is: SELECT userid FROM user WHERE usergroupid = 2 AND PUT THE userid INTO award_user.userid ASSOCIATED WITH award_user.award_id = 14 (i have to give the award 14 to all the users of the group 2) any idea? thanks a lot! EDIT: ok i managed to insert the userid, but now they show 0 in the award_id column. I have to change all the 0 to 14 INSERT INTO award_user(award_id) VALUES (16) WHERE award_id=0 is not working EDIT 2: ok, I had to use the UPDATE function! |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|