Results 1 to 4 of 4
Thread: simple averaging of table column
Feb 23, 2013, 20:06 #1
- Join Date
- May 2002
- 0 Post(s)
- 0 Thread(s)
simple averaging of table column
This is for a single column, and I don't want to group - so not using AVG
Want to just average all the numerical values in a column, into a single result.
What is this missing?
<?php $result = "SELECT amounts FROM inventory (SUM( inventory.amounts ) / ( COUNT( mysql_num_rows($result))"; ?>