help with query to change existing membership levels to gold

Hello I want to change all existing membership levels from standard to gold (paid membership level)

I know a query can do this but I don't know how to do as or what table

I would love some help as its going to take me days to do it all manually.

 

Regards

Jennifer

Jennifer Bogan .. Acc. Dip. Psychology - EMAIL: jennifer.bogan@gmail.com
Quote · 2 Feb 2011

User Membership Levels are stored here:

sys_acl_levels_members


There can be multiple line items for each user - as a record is created each time a users level is changed.


I suppose you could write a query similar to this:

UPDATE sys_acl_levels_members SET IDLevel = replace( IDLevel, 'string_to_find', 'string_to_replace' ) ;


replace string_to_find with the ID that corresponds to the Member level you wish to replace (Standard)

replace string_to_replace with the ID the corresponds to the Member level you wish to set everyone at (Gold)

Those ID's can be found in sys_acl_levels table.


Quote · 2 Feb 2011

 

User Membership Levels are stored here:

sys_acl_levels_members


There can be multiple line items for each user - as a record is created each time a users level is changed.


I suppose you could write a query similar to this:

UPDATE sys_acl_levels_members SET IDLevel = replace( IDLevel, 'string_to_find', 'string_to_replace' ) ;


replace string_to_find with the ID that corresponds to the Member level you wish to replace (Standard)

replace string_to_replace with the ID the corresponds to the Member level you wish to set everyone at (Gold)

Those ID's can be found in sys_acl_levels table.


Hello thank you so much for this.

UPDATE sys_acl_levels_members SET IDLevel = replace( IDLevel, '2', '4' ) ;

I see the only ones in that table are the ones I changed manually from standard to gold aprox 100 when I have over 500 members.

Which means this works for the members in this table but not for the other 400+ that aren't

I don't know how this got to be so empty perhaps as I was not using membership any longer I removed the table in an upgrade.

 

Puts me in a bad position to ADD all IDMember to have an IDLevel of 4

 

Regards

Jenifer

Jennifer Bogan .. Acc. Dip. Psychology - EMAIL: jennifer.bogan@gmail.com
Quote · 3 Feb 2011

I can explain why the table is so empty.

That table is only filled with members whos level is different than standard. In other words, when the table is empty, then all members are standard.

So all your members would need to be copied to that table.

So if all are to be gold then the easy way to do this would be to empty the table so you can start over.


Then copy all your current members to it. Like so.

insert into `sys_acl_levels_members` (`IDMember`) select `ID` from `Profiles`

Then run a second query to change the level and starting date.

UPDATE `sys_acl_levels_members` SET `IDLevel` = 4,`DateStarts`=NOW()

I am sure there is a way to do that with one query, but it would take me a while to figure it out. MYSQL is not my strong point.

Then clear the cache of course.

https://www.deanbassett.com
Quote · 3 Feb 2011

 

I can explain why the table is so empty.

That table is only filled with members whos level is different than standard. In other words, when the table is empty, then all members are standard.

So all your members would need to be copied to that table.

So if all are to be gold then the easy way to do this would be to empty the table so you can start over.


Then copy all your current members to it. Like so.

insert into `sys_acl_levels_members` (`IDMember`) select `ID` from `Profiles`

Then run a second query to change the level and starting date.

UPDATE `sys_acl_levels_members` SET `IDLevel` = 4,`DateStarts`=NOW()

I am sure there is a way to do that with one query, but it would take me a while to figure it out. MYSQL is not my strong point.

Then clear the cache of course.

Hey Deano purfect!

 

Yes they had to first get to sys_acl_levels_members in order to change them

Thank you both all members successfully changed to gold

 

Regards

Jennifer

Jennifer Bogan .. Acc. Dip. Psychology - EMAIL: jennifer.bogan@gmail.com
Quote · 3 Feb 2011
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.