I would like to do an automatic calculation with decimals:
Example:
Cb_number1 + cb_number2 = cb_number3
0.001 + 0.002 = 0.003
I do not know if this is the right method, I have the addon Query field
I wrote: SELECT (`cb_number` +` cb_number2`) FROM `#__ comprofiler` WHERE` id` = '[cb_number3]' in the section "CB QUERY Fied"
It does not work
Thank you for your help
Jérôme
Doesn't work because id is the user_id of the user in _comprofiler. You need to check `id` = '[user_id]' and in your select add number 1 and 2 together. Example as follows.
Code:
SELECT ( `cb_number1` + `cb_number2` ) FROM `#__comprofiler` WHERE `id` = '[user_id]'
cb_number 3 would just be your query field.
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.
It should use decimals assuming your values are stored with decimals as it's just adding the 2 values together. If you're using an integer field you can't have decimals. It needs to be a text or float field and since we've no float field types you'll need to use a text field.
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.