[SOLVED] SQL Actions Not Working

12 years 11 months ago - 12 years 11 months ago #159457 by Robert_ITMan
Replied by Robert_ITMan on topic Re: SQL Actions Not Working
Ornithologist,

Seeing as [amount] is not available in MySQL Actions you can pull the info directly from the database donations table ... try adding the following to the Activation field (CBsubs > Plan > Integrations > MySql):

UPDATE `jos_comprofiler` SET `cb_adminnotes` = '---' WHERE `id` = [user_id] AND `cb_adminnotes` IS NULL LIMIT 1;
UPDATE `jos_comprofiler` SET `cb_adminnotes`=CONCAT(' Made a donation of $ ',(SELECT `amount` FROM `jos_cbsubs_donations` WHERE `user_id` = [user_id] ORDER BY `payment_date` DESC LIMIT 1),'<br /><br />',`cb_adminnotes`) WHERE `id` = [user_id];


Notice you will need to create a 'Editor Text Area' field 'cb_adminnotes' under CB Field Management for this example to work as is.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.406 seconds

Facebook Twitter LinkedIn