• Top Members
  • 834 Replies
    2585 Replies
  • 716 Replies
    2026 Replies
  • 331 Replies
    1928 Replies

Sqlite calculating

Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
User avatar
VIP - Donator
Posts: 1967

Sqlite calculating

Tue Jul 17, 2018 4:07 am


Can someone help me out please
i can't get it to work

Code: Select all

            attributes = "mypayments.num,mypayments.mdate,mypayments.mamount,mydebtsborrow.mamount,mydebtsborrow.mamount - mypayments.mamount"

its keep the same value :(
like we have 26.731,32 we want to calculate that by 318.23 and then get the output
and then we don't know how we can use that output again to calculate it again by the next record

the first record sum shows as: 26.413,09
the mypayments.mamount records have only 318.23 as amount
and the basic of this account mydebtsborrow.mamount has 26.731,32

so when we calculate it all i need at the end of the data 19.730,26

Thank you

User avatar
VIP - Donator
Posts: 1967

Re: Sqlite calculating

Thu Jul 19, 2018 4:24 am

This is the code in sqlite itself
but i can't manage it to work what we are looking for :(

Code: Select all

SELECT mypayments.num,mypayments.mamount,mydebtsborrow.mamount,mydebtsborrow.mamount - mypayments.mamount as TOTAL FROM mypayments left JOIN mydebtsborrow ON mydebtsborrow.num = mypayments.mnum WHERE mypayments.mnum=6 ORDER BY mypayments.num DESC ;

Post Reply

Return to “Coding Help & Support”