[SOLVED] SQL actions within CBSUBS

14 years 4 months ago #117616 by craschnburn
[SOLVED] SQL actions within CBSUBS was created by craschnburn
Hello.

Could someone help me in regards to inputting SQL statements within each plan.

I've setup each plan to execute an SQL statement that input a dedicated value into a pre-created field within the jos_comprofiler table.

An example of the statement is
[code:1]UPDATE `10150910`.`jos_comprofiler` SET `cb_memberstatus` = '1'[/code:1]

Well, it doesn't seem to work.

1. Is there a format which I must follow? Or am I missing a ";" at the end of my statement?

2. Can I run multiple statements within each action?

Thank you in advance.
tom

Post edited by: krileon, at: 2009/11/25 20:55

Please Log in to join the conversation.

14 years 4 months ago #117625 by craschnburn
Replied by craschnburn on topic Re:SQL actions within CBSUBS
Ok. I think my problem is not within CBSUBS. I think its somewhere else. But I'll update this as soon as I find the culprit.

Thanks anyways.

Please Log in to join the conversation.

14 years 4 months ago #117626 by craschnburn
Replied by craschnburn on topic Re:SQL actions within CBSUBS
But I would like to know about if i have to end the query with a ";" or not.

and if you can run more than one query. But i think i tried the multi query, and it didn't seem to work.

thanks again.

Please Log in to join the conversation.

14 years 4 months ago #117628 by krileon
Replied by krileon on topic Re:SQL actions within CBSUBS
Don't know about your query structure, but no you do not need to end with ;. Multiple queries per input box is also not supported, yet; more is to come for SQL Actions integration, but such talk is for a later time.

Changing a fields value will not function properly if the user is given a subscription from User Management, the reason being is you're saving the users profile data directly after changing a users subscription. Your query is fired and the value is changed, but then the profile is saved and the previous value will overwrite what your query changed. So testing with User Management will result in negative results always.


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.

14 years 4 months ago #117629 by craschnburn
Replied by craschnburn on topic Re:SQL actions within CBSUBS
Ah. Thanks for the reply. I understand. So then can I change my script to.....
well....
what do you think i should do?

Is there another around this which I'd like to change the value of a field as to subscription status?

Please Log in to join the conversation.

14 years 4 months ago #117641 by craschnburn
Replied by craschnburn on topic Re:SQL actions within CBSUBS
Do you think I can execute an SQL statement to run a php file which will do what I would need to do with certain tables within the database?

My knowledge of SQL is still at a novice level. Please excuse me if i sound like I am trying know what I am talking about.

I'd like to utilize the SQL integration in the subscription plans to add certain values into the users' profile database table such as jos_comprofiler, according to their plan.

Some of these values are searchable and viewable within the user's profile.

These fields are also changing according to the upgrade of the plan that they are in to the next plan.

Is there a better way to do this other than utilizing SQL integration?

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.486 seconds

Facebook Twitter LinkedIn