sql query help

11 years 1 month ago #99355 by artnco
sql query help was created by artnco
hello on activation plan i use this query

INSERT INTO #__paidsystem_credits VALUES ('','[user_id]','100')

this ad 100 credits to the user to ad ads
so on deactivation i do nothing ok, now when the user re active his plan i would like to update his credits for exemple if the user have 100 credits the update will be 100 +100 = 200 the user have now 200 credits !

how do this ?

thanks

Please Log in to join the conversation.

11 years 2 weeks ago #102198 by krileon
Replied by krileon on topic Re:sql query help
Something like the following:
UPDATE `#__paidsystem_credits` SET `credits` = credits + 100 WHERE `user_id` = [user_id]


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.

Moderators: beatnantkrileon
Time to create page: 0.402 seconds