CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 mysql calucluations

Print topic Send  topic

Author Message
itzumar

Posts: 88
Posted: 01/28/2013, 3:59 AM

HELLO


i have problem.I HAVE MYSQL TABLE AS:
S# TOTAL AMOUNT PAID BALANCE (Total AMount- Paid)
1 20000 1000 19000


now i want Total amount should be 19000 for next entery. how can i do that? any help?
_________________
Umar
View profile  Send private message
Lucius

Posts: 220
Posted: 01/28/2013, 10:38 AM

Hi,

I would suggest checking MySQL docs or google, as this is some very basic operations you are asking about. But in this case it would look something like:
  
INSERT INTO your_table (total_amount, paid, balance) VALUES  
((SELECT balance FROM your_table WHERE s = 1), 0, 0)  
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.