vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Query for updating user rank / title (https://vborg.vbsupport.ru/showthread.php?t=286771)

Nullification 08-17-2012 06:43 PM

Query for updating user rank / title
 
Can someone write a query that allows me to select a particular user group and update it's update user rank + user title.

Thanks

kh99 08-17-2012 07:31 PM

What do you mean exactly? Do you want to make some kind of change to ranks or titles like you'd do from the adminCP? Or do you want to recalculate ranks and titles for a usergroup?

Nullification 08-17-2012 07:43 PM

Quote:

Originally Posted by kh99 (Post 2357707)
What do you mean exactly? Do you want to make some kind of change to ranks or titles like you'd do from the adminCP? Or do you want to recalculate ranks and titles for a usergroup?

I want to recalculate ranks and user titles for a particular user group.

kh99 08-17-2012 07:51 PM

I don't know that that can be done using a query (if it could, it would be a complicated one). If you look in admincp/misc.php around line 354 (where it says "if ($_REQUEST['do'] == 'updateuser')"), then you can see the code that's used to update titles and ranks when you do it from the admincp. (You could add a "WHERE usergroupid =" to only do it for one primary usergroup. If you wanted to include a check for secondary usergroups, you'd have to check the membergroupid field).


All times are GMT. The time now is 12:40 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.01041 seconds
  • Memory Usage 1,709KB
  • 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
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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