Version: v2.3.0
min
Return the minimum value of a column.
min($table, $column, $where)
table [string]
The name of the table to query.
column [string]
The column to evaluate.
where [array] (optional)
The WHERE clause used to filter the result set.
min($table, $join, $column, $where)
table [string]
The name of the table to query.
join [array]
The join definitions used to combine related tables.
column [string]
The column to evaluate.
where [array] (optional)
The WHERE clause used to filter the result set.
Return Value
[mixed] The minimum value found in the specified column.
$min = $database->min("account", "age", [
"gender" => "male"
]);
echo "The age of the youngest male user is {$min}";