I would like to run a mysql query to copy the exact forum permissions from one usergroup to another. Ideally, when query is complete, the two usergroups will have identical permissions for all forums and subforums.
I am far from a SQL guru but I maybe my feeble attempt can give some idea of what I would like to do:
usergroupid = 2 {source usergroup whose permissions I would like to copy}
usergroupid = 83 {target usergroup whose permissions I would like to overwrite}
Step 1:
PHP Code:
SELECT forumpermissions FROM forumpermission WHERE usergroupid = 2;
Step 2: This is where I am stuck
PHP Code:
UPDATE forumpermission SET forumpermissions = {the ones selected above} WHERE usergroupid = 83;
Any help would be greatly appreciated.
Thanks!