![]() |
|
Thread Tools |
#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: http://www.vbulletin.org/forum/showthread.php?t=256215 any idea? No members have liked this post.
|
#2
|
||||
|
||||
in phpmyadmin run the SQL Query:
Make sure you add your table prefix to "user" if you have one. 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.
__________________
-Joe Former vb.org Moderator. Retired. @BirdOPrey5 | All Things BOP5 | Joe's Ultimate Off Topic Note - I no longer making new VB mods, sorry. No members have liked this post.
|
#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! No members have liked this post.
Last edited by SnakeEaterITA; 22 Jun 2011 at 10:10. |
![]() |
«
Previous Thread
|
Next Thread
»
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
|
|
New To Site? | Need Help? |
All times are GMT. The time now is 12:46.