Hi,
CB Auto Action is the greatest.
I've done it (hopefully), here is how:
I have a CB field called e.g. "cb_vip", the value of which is changed to 1 on VIP plan subscription.
Then I've made a CB Auto Action for it like so:
Type: Field
Trigger: Before Draw Subscription
User: Automatic
Access: Everybody
Conditional: [cb_vip] Empty
Action:
Field [cb_vip]
Operator Set (Field=Value)
Value 0
Then I've made another CB Auto Action:
Type: Query
Trigger: Before Draw Subscription
User: Automatic
Access: Everybody
Action: Query:
Code:
UPDATE `#__myothertable`
SET `vip_222` = (SELECT `cb_vip`
FROM `#__comprofiler`
WHERE `#__comprofiler`.`user_id` = `#__myothertable`.`222_id` AND `#__comprofiler`.`cb_vip` = 1);
UPDATE `#__myothertable`
SET `vip_222` = 0
WHERE `vip_222` != '1';
Thank you CB Auto Action and god bless you,
Regards,
ricco