How to find the average?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
jescobar
Forum Newbie
Posts: 24
Joined: Mon Jun 06, 2005 4:14 am

How to find the average?

Post by jescobar »

what's the best way to get an average? The values are going to be coming from MySQL db and I wanted to be able to get the average of about 5 numbers.

I.E.

Every day I get like 5-6 different numbers I would like to have the average for, they are represented in percent and the numbers go from 0.00% to 100.00% and I guess I didn't know how to calculate the average from database tables.

Thanks!
J.
User avatar
Oren
DevNet Resident
Posts: 1640
Joined: Fri Apr 07, 2006 5:13 am
Location: Israel

Post by Oren »

User avatar
jescobar
Forum Newbie
Posts: 24
Joined: Mon Jun 06, 2005 4:14 am

Post by jescobar »

sweet, thanks alot. I must also say it's alot easier than expected.

Once again thanks a bunch.
Post Reply