Get Started

Where Syntax

Query

Transaction

Advanced

PDO object

Debug

Information

version: 1.1.3

avg

Get the average value for the column

avg($table, $column, $where)
avg($table, $join, $column, $where)
Return: [number] The average number of the column.
$average = $database->avg("account", "age", [
	"gender" => "male"
]);

echo "The average age of male user is " . $average;