Medoo

开始

Where 语句

查询

Transaction

原生SQL查询

PDO object

Debug

数据库信息

avg

获得某个列字段的平均值

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

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