If none of the users belong to another secondary group, then this query should work:
Code:
UPDATE user
SET membergroupids = X
Code:
UPDATE user
SET membergroupids = CONCAT( '' , membergroupids , ',X' )
I haven't tested this, so backup first and use with caution. Also, these queries do not check if the user is already a member of X.
Hopefully that helps. I don't know of a more universal query for this.
Leave a comment: