Max
获取列的最大值。
max($table, $column, $where)
-
table [string]
表名。
-
column [string]
将要计算的目标列。
-
where (可选) [array]
用于过滤记录的 WHERE 子句。
max($table, $join, $column, $where)
-
table [string]
表名。
-
join [array]
表的表关联。
-
column [string]
将要计算的目标列。
-
where (可选) [array]
用于过滤记录的 WHERE 子句。
返回: [string] 列的最大值。
$max = $database->max("account", "age", [ "gender" => "female" ]); echo "最年长女性用户的年龄是 " . $max;