takeiteasy Posted April 26, 2006 Share Posted April 26, 2006 I have this problem here, i want to generate outstanding balance in my codes.i have 2 attributes, quotes and amtPaid in mysql table.my outstanding balance = quotes - amtPaidso do i need to declare a new attribute in the MySQL table?do MySQl have Subtraction aggregate functions?Thanks In Advance! Quote Link to comment https://forums.phpfreaks.com/topic/8444-calculate-balance/ Share on other sites More sharing options...
samshel Posted April 26, 2006 Share Posted April 26, 2006 [!--quoteo(post=368767:date=Apr 26 2006, 03:58 AM:name=takeiteasy)--][div class=\'quotetop\']QUOTE(takeiteasy @ Apr 26 2006, 03:58 AM) [snapback]368767[/snapback][/div][div class=\'quotemain\'][!--quotec--]I have this problem here, i want to generate outstanding balance in my codes.i have 2 attributes, quotes and amtPaid in mysql table.my outstanding balance = quotes - amtPaidso do i need to declare a new attribute in the MySQL table?do MySQl have Subtraction aggregate functions?Thanks In Advance![/quote]Try this out"select (quotes-amtPaid) as outstanding_balance from table_name"hth Quote Link to comment https://forums.phpfreaks.com/topic/8444-calculate-balance/#findComment-30882 Share on other sites More sharing options...
takeiteasy Posted April 26, 2006 Author Share Posted April 26, 2006 Hey! thanks so much! i managed to solve it!! so happy! Quote Link to comment https://forums.phpfreaks.com/topic/8444-calculate-balance/#findComment-30885 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.