MySQL db - change all "user_group_list" from "0" to "#" instantly MySQL db - change all "user_group_list" from "0" to "#" instantly
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

MySQL db - change all "user_group_list" from "0" to "#" instantly

Started by stardust, January 19, 2009, 03:07:43 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

stardust

I'm not familiar with the terminology on mysql db but I wonder if there is a query I can run, or just something I can do, to change all the "0" to "5" in the user_group_list part of cpg14x_users? I want them to change all at once.

I already set the Default to 5, but that looks like it is only for members who joined after I set that. And I don't want to manually go through each member because I have nearly 2000 Registered members in my gallery. There are a few members who are in different primary groups, as Mods or other staff kind of members. Group 5 is what I want checked on all Registered/different group members. So while group 5 isn't primary, I have albums assigned to it that I want only logged in users to see, without having to change their primary groups.

Please tell me there is some way to do this ???

Nibbler

UPDATE cpg14x_users SET user_group_list = REPLACE(user_group_list, 0, 5);

Make a backup before running just in case.

stardust

Excellent! Worked without a problem. Thanks, you saved me a lot of time!