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