vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Database query to list all users within usergroup? (https://vborg.vbsupport.ru/showthread.php?t=309822)

Ua|Eight 03-23-2014 01:47 PM

Database query to list all users within usergroup?
 
If I wanted to export a list of users in usergroup id = 44, how would I go about that?

ForceHSS 03-23-2014 02:30 PM

Export them to where?

ozzy47 03-23-2014 03:11 PM

You can do that from phpmyadmin within your cpanel, by running this query:

Code:

SELECT * FROM user
WHERE usergroupid = 44

You can then export the list from there.

Simon Lloyd 03-23-2014 05:51 PM

Quote:

Originally Posted by ozzy47 (Post 2489070)
You can do that from phpmyadmin within your cpanel, by running this query:

Code:

SELECT * FROM user
WHERE usergroupid = 44

You can then export the list from there.

You can run that directly in admincp>maintainance>execute sql query and you'll get a list :) (don't forget to add any table prefix you use before "user" so maybe you use vb as the prefix and it would look like this

PHP Code:

SELECT FROM vb_user
WHERE usergroupid 
44 


ozzy47 03-23-2014 05:52 PM

Quote:

Originally Posted by Simon Lloyd (Post 2489109)
You can run that directly in admincp>maintainance>execute sql query and you'll get a list :) (don't forget to add any table prefix you use before "user" so maybe you use vb as the prefix and it would look like this

PHP Code:

SELECT FROM vb_user
WHERE usergroupid 
44 


Right, but he won't be able to export it as he asked in the OP. :)

Simon Lloyd 03-23-2014 05:57 PM

Doh, should read more carefully :D

ozzy47 03-23-2014 05:58 PM

It happens to all of us at some point. :)

Simon Lloyd 03-23-2014 06:06 PM

This should help you export the results to csv http://www.tech-recipes.com/rx/1475/...t-or-csv-file/


All times are GMT. The time now is 11:37 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01009 seconds
  • Memory Usage 1,725KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (2)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete