title: php/mysql add rows together to get total
body: <p>here's the scenario. I am generating a report of all the members who have dues to pay for a certain time period.</p>
  
  <p>I am successfully selecting and displaying each database entry as a row in a html table.</p>
  
  <p>The problem is the total fields the report must have. Each member pays different amounts based on what services they use, so I must add the values in each field individually to ensure proper result.</p>
  
  <p>Question is, how do I go about adding the rows/field together?</p>
  
  <p>Edit:</p>
  
  <p>To clarify. I am adding dues paid and donations paid fields. They are classified and integer in mysql database.</p>
  
  <p>Example, let's say that my query returns 3 results. I wish to add the dues paid for all 3 results and display it as total_dues_paid. Same idea for donations. </p>
  
  <p>This must be dynamic for any given number of results, as this changes month to month and we have seen several hundred results in some months.</p>
  
  <p>Thanks</p>