version: 2.1.12
min
Get the minimum value of the column.
min($table, $column, $where)
table [string]
The table name.
column [string]
The target column will be calculated.
where (optional) [array]
The WHERE clause to filter records.
min($table, $join, $column, $where)
table [string]
The table name.
join [array]
Table relativity for tables.
column [string]
The target column will be calculated.
where (optional) [array]
The WHERE clause to filter records.
Return: [string] The minimum number of the column.
$min = $database->min("account", "age", [ "gender" => "male" ]); echo "The age of the youngest male user is " . $min;