Silvar Posted December 31, 2012 Share Posted December 31, 2012 Okay, I got this mysql table called guilt_changes where there's a column called amount. There's also a column called belongs which has an ID number. My script has to take all of the output from all rows with the same ID and add them up together to one value. Can anyone help me with that? Link to comment https://forums.phpfreaks.com/topic/272556-adding-up-on-several-rows/ Share on other sites More sharing options...
Christian F. Posted December 31, 2012 Share Posted December 31, 2012 Yep: http://www.tizag.com/mysqlTutorial/mysqlsum.php Also, for future reference, I would recommend that you read this article. Link to comment https://forums.phpfreaks.com/topic/272556-adding-up-on-several-rows/#findComment-1402443 Share on other sites More sharing options...
Silvar Posted December 31, 2012 Author Share Posted December 31, 2012 Yep: http://www.tizag.com...al/mysqlsum.php Also, for future reference, I would recommend that you read this article. Thank you very much. Will do Link to comment https://forums.phpfreaks.com/topic/272556-adding-up-on-several-rows/#findComment-1402459 Share on other sites More sharing options...
Christian F. Posted December 31, 2012 Share Posted December 31, 2012 You're welcome, glad I could help. Link to comment https://forums.phpfreaks.com/topic/272556-adding-up-on-several-rows/#findComment-1402469 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.