AcyMailing list SQL statements

13 years 9 months ago #136336 by ThePiston
Replied by ThePiston on topic Re:AcyMailing list SQL statements
would it be better to use another SQL action slot if I want to subscribe a user to 2 or more newsletters at the same time or can I alter the code to do this in one action?

CB 2.3, CBsubs 4.3, PHP 7.1, J! 3.9.X

Please Log in to join the conversation.

13 years 9 months ago #136339 by joomextensions.com
Replied by joomextensions.com on topic Re:AcyMailing list SQL statements
You can do that in one query:

[code:1]INSERT IGNORE INTO `#__acymailing_listsub` ( `listid`, `subid`, `subdate`, `status` )
VALUES ( <listid1>, ( SELECT `subid` FROM `#__acymailing_subscriber` WHERE `userid` = [user_id] ), UNIX_TIMESTAMP( NOW() ), 1 ),
( <listid2>, ( SELECT `subid` FROM `#__acymailing_subscriber` WHERE `userid` = [user_id] ), UNIX_TIMESTAMP( NOW() ), 1 ),
( <listid3>, ( SELECT `subid` FROM `#__acymailing_subscriber` WHERE `userid` = [user_id] ), UNIX_TIMESTAMP( NOW() ), 1 )
[/code:1]

Please Log in to join the conversation.

13 years 9 months ago #136342 by ThePiston
Replied by ThePiston on topic Re:AcyMailing list SQL statements
thanks - what about multiple deletions upon deactivation?

CB 2.3, CBsubs 4.3, PHP 7.1, J! 3.9.X

Please Log in to join the conversation.

13 years 9 months ago #136355 by joomextensions.com
Replied by joomextensions.com on topic Re:AcyMailing list SQL statements
About the deletion:

[code:1]DELETE FROM `#__acymailing_listsub` WHERE ( (`listid` IN (<listid1>,<listid2>,<listid3>«»)) AND (`status` = 1) AND (`subid` = (SELECT `subid` FROM `#__acymailing_subscriber` WHERE `userid` = [user_id] ) ) )[/code:1]

Please Log in to join the conversation.

13 years 9 months ago #136406 by krileon
Replied by krileon on topic Re:AcyMailing list SQL statements
We've approved the development of an AcyMailing integration that will be available with next CBSubs release. The integration features usage of AcyMailing API as well. Just a heads up for those needing ACyMailing integration. ;)


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

13 years 9 months ago #136413 by joomextensions.com
Replied by joomextensions.com on topic Re:AcyMailing list SQL statements
That's great! :)

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.206 seconds

Facebook Twitter LinkedIn