How to query db and sum the rows returned

Hello,

I have a need to query the DB for all products sold to a client then get the total. This then needs to be displayed in a field.

I am using SugarCRM CE 6.5.13

I would greatly appreciate any assistance.

Thanks.

Parents
  • Hi

    you can query by client id with product_client relation table then it will give all product record ids.

    then make a loop for count of total from product modules.

  • Thank you for your reply. I am fairly new to SugarCRM CE and forgive me a follow up question. How do you do this. I have tried many times and I am not getting it. Could you show me a mock up of code. Thank you for your help.

Reply
  • Thank you for your reply. I am fairly new to SugarCRM CE and forgive me a follow up question. How do you do this. I have tried many times and I am not getting it. Could you show me a mock up of code. Thank you for your help.

Children
No Data