Version: v2.4.0
max
Return the maximum value of a column.
max($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.
max($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 maximum value found in the specified column.
$max = $database->max("account", "age", [
"gender" => "female"
]);
echo "The age of the oldest female user is {$max}";