Topic: Finding a SUM of a certain column in mysql and a total of entries

I have been searching and can't really find a clear answer on this.

I have a single table in mysql database that is a list of emails, username, and an amount of product for each.

My goal is to find a way to put the total amount of entries on the website so far...

and also be able to to total the product so far via the amount column...

nvm figured it out

<%= @emailer_pages.item_count %>
gave me total entries in my table

<%= Emailer.sum('amount')%>
gave me sum total of amount in table.

Last edited by ObsoleteAsian (2006-12-12 00:28:51)