Hi All:
Quick question, I have a table with the number of people coming to a party and I would like to display the results (easy enough, right). That part I am having a challenge with is adding the total number at the bottom of the results. Can someone point me in the direction of a tut?
Math with PHP/MySQL
Moderator: General Moderators
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: Math with PHP/MySQL
You can add them up as you loop through the rows to display the data. Or you can use the SUM() function in SQL. See the MySQL docs for examples.
(#10850)