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