At 12:51 AM 4/14/2006, Brian E Boothe wrote:
HI all ;

i wanna be able to sum a colum in a mysql database and display the sum on the page field name <"Bondrem"> so if someone adds to the database the bondremaining colom would add together and show the total on the page

record1 - ["bondrem"]=100
record2 - ["bondrem"]=450

    total bondrem on page would show 550

 can anyone help me >


select sum(bondrem) as "Total BondRem" from table

This is covered in the manual. You also have
You can also summarize by month to give you monthly results etc.
See Group By:
http://dev.mysql.com/doc/refman/4.1/en/group-by-functions.html
http://dev.mysql.com/doc/refman/4.1/en/group-by-functions.html

Mike


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to