dannybrazil Posted January 22, 2010 Share Posted January 22, 2010 Hello I have a table that contains date and amount of money I earned that day. every day I add on row How can I make a code that will calculate the TOTAL earnings till today...and will continue automatically every day ex: Date Amount 1-1-2010 10$ 2-1-2010 20$ Total income is :30$ *and tomorrow it will update alone Link to comment https://forums.phpfreaks.com/topic/189467-adding-numbers-from-database/ Share on other sites More sharing options...
wildteen88 Posted January 22, 2010 Share Posted January 22, 2010 If you're using MySQL database then you can calculate this within your query using the MySQL SUM() function, example usage can be found here Link to comment https://forums.phpfreaks.com/topic/189467-adding-numbers-from-database/#findComment-1000087 Share on other sites More sharing options...
dannybrazil Posted January 22, 2010 Author Share Posted January 22, 2010 Exactly this THANKS Link to comment https://forums.phpfreaks.com/topic/189467-adding-numbers-from-database/#findComment-1000090 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.