版本: 1.1.3
max
获取一列中最大的值
max($table, $column, $where)
table [string]
表名称。
column [string]
将要计算的目标列。
where (optional) [array]
过滤记录的 WHERE 子句。
max($table, $join, $column, $where)
table [string]
表名称。
join [array]
表连接中的关系。
column [string]
将要计算的目标列。
where (optional) [array]
过滤记录的 WHERE 子句。
返回: [number] 此列中的最大值。
$max = $database->max("account", "age", [ "gender" => "female" ]); echo "The age of oldest female user is " . $max;