PDA

View Full Version : Copy User from one Secondary to another


Cyricx
12-28-2005, 01:07 PM
Okay, so I've been digging around and it looks like this will require a modification to do.

Basically what I'm hoping to do is have a way to copy all the users in X secondary usergroup to also be a member of X secondary usergroup.

Marco van Herwaarden
12-28-2005, 01:17 PM
UPDATE user
SET membergroupids = CONCAT(membergroupids, ',X')
WHERE FIND_IN_SET(Y, membergroupids)
AND NOT FIND_IN_SET(X, membergroupids)
Replace X (twice) with the new secondary membergroupid.
Replace Y with the current usergroupid.

Not tested, make a backup before trying.

Cyricx
12-28-2005, 01:22 PM
Backed up and ran.

Worked like a charm! Thanks Marco :) :)