Silvar Posted December 31, 2012 Share Posted December 31, 2012 (edited) 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? Edited December 31, 2012 by Silvar Quote 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 (edited) Yep: http://www.tizag.com/mysqlTutorial/mysqlsum.php Also, for future reference, I would recommend that you read this article. Edited December 31, 2012 by Christian F. Quote 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 Quote 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. Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.