[SOLVED] SQL Actions Not Working

8 years 3 months ago - 8 years 3 months ago #159457 by Robert_ITMan
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.
Moderators: beatnantkrileon
Time to create page: 0.357 seconds
Facebook Twitter Google LinkedIn