[SOLVED] Query not working in auto actions

11 years 10 months ago - 11 years 10 months ago #203597 by abrbhat
I am using the query as shown in picture and it is not working.The trigger seems to be working fine.
Infact, i've tried other queries on other fields, they are also not working.
Any solutions?
Attachments:

Please Log in to join the conversation.

11 years 10 months ago #203622 by krileon
Replied by krileon on topic Re: Query not working in auto actions
The SET escaping is wrong. Columns need to be escaped with `. Please see the below (for future reference please copy your query directly to post).
UPDATE `#__comprofiler` SET `cb_cityjk` = 'toast' WHERE `user_id` = '[user_id]'

Please note you shouldn't update CB fields using a Query action unless you need the SQL functions. Please use a Field action.


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.

11 years 10 months ago #203696 by abrbhat
Replied by abrbhat on topic Re: Query not working in auto actions
Is there something fataly wrong with updating CB fields with Query action? I've got to update almost 40 fields with an action and i've got 20 such actions. Is there any better solution?

Please Log in to join the conversation.

11 years 10 months ago - 11 years 10 months ago #203713 by krileon
Replied by krileon on topic Re: Query not working in auto actions

Is there something fataly wrong with updating CB fields with Query action?

It doesn't update the immediate user object. Doesn't particularly matter thought if there's a page load after the trigger usage. It may be best to use a query if you need multiple fields updated at once though.

Is there any better solution?

Yes, a Field action.


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.

11 years 10 months ago #203753 by abrbhat
Replied by abrbhat on topic Re: Query not working in auto actions
Got It!

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.232 seconds

Facebook Twitter LinkedIn