The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
sql command for adding a member to user group?
I have a "hidden" forum (H_forum). Till now I must add
registered member to a group (H_group) - the only group that has access to H_forum. Now the hidden H_forum is bigger, I can not add new member to H_group myself, I want moderators of H_forum can add new member to H_group too. anyway the problem is: the H_group is hidden too, is not Joinable. I have idea to write small php script runable only by moderators of H_forum, the php script will run sql command like this: UPDATE vb3_user SET options= newOptionWithmembergroupids = 'numberOf_H_group' WHERE ... Could you write me the sql command? I have zero know-how about VB db tables structure, i will be very appriciated with your help and time. |
#2
|
||||
|
||||
[sql]
UPDATE user SET membergroupids = CONCAT_WS(',', membergroupids, 'x') WHERE userid=y [/sql] should do te trick. Plase note that you must replace x with the id of youre h group and y with the userid of the user you want to add. If you use a table prefix you must add it in front of user. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|