Acajoom SQL Integration

9 years 4 months ago #121067 by nant
Ok, another contribution:

This one subscribes a user to a specific Acajoom list (newsletter or smart-newsletter - autoresponder is not supported by this query) with listid number = <listid> (you need to look at your backend Components -> Acajoom -> Lists area to find the listid of your list. Make sure you substitute <listid> with your listid value.

[code:1]
INSERT INTO `#__acajoom_queue` ( `type`, `subscriber_id`, `list_id`, `acc_level` ) VALUES ( (SELECT `list_type` FROM `#__acajoom_lists` WHERE `id` = <list_id> ), ( SELECT `id` FROM `#__acajoom_subscribers` WHERE `user_id` = [user_id] ), <listid> , (SELECT `acc_id` FROM `#__acajoom_lists` WHERE `id` = <list_id> ) )
[/code:1]

And this one removes the subscription (once again remember to replace <listid> with your listid:

[code:1]DELETE FROM `#__acajoom_queue` WHERE ( (`list_id` = <listid> ) AND (`subsciber_id` = (SELECT `id` FROM `#__acajoom_subscribers` WHERE `user_id` = [user_id] ) ) )
[/code:1]

As always, please backup first and test.

Also please note that all these SQL integration depend on the specific database scheme - if the component changes database tables, then the integration might not work.

Post edited by: nant, at: 2010/01/13 18:21
9 years 4 months ago #121070 by ThePiston

This one subscribes a user to a specific Acajoom list with listid number = <listid> (you need to look at your backend Components -> AcyMailing -> Lists area to find the listid of your list. Make sure you substitute <listid> with your listid value.

did you mean Components -> Acajoom -> Lists ?

CB 2.3, CBsubs 4.3, PHP 7.1, J! 3.9.X
9 years 4 months ago #121117 by coachnet
Thanks Nant.

Will try this but just wondering if there is an extra bit in the deletion code?

><img src=" www.joomlapolis.com/components/com_joomlaboard/emoticons/wink-grey.png " alt="" style="vertical-align: middle;border:0px;" /


As I have no experience with SQL I'll wait for your response before testing!

Thanks,
Renee

Renee Hasseldine
CoachNetwork Founder
Life Coaches | Business Coaches | Executive Coaches
9 years 4 months ago #121132 by coachnet
Thanks for that.

I've just test the activation code and it didn't work for me. The code on this topic didn't work for me either.

I've just copied and pasted the code as is into the SQL Action tab for the appropriate plan and substituted <listid> with 2.

I notice there are some spaces before and after some of the (), symbols... can't this be a problem?

Renee Hasseldine
CoachNetwork Founder
Life Coaches | Business Coaches | Executive Coaches
Moderators: beatnantkrileon
Time to create page: 0.402 seconds