ptb_max
Finds the biggest numeric value in given field. (For the smallest value, use ptb_min.)
Syntax
$var = ptb_max($database, $fieldname);
Syntax description
- $database
- variable containing connected database
- $fieldname
- name of the field, for which the biggest value should be found
Return
This function returns integer when used on field with numeric value or null if database is empty.
Sample(s)
$lastYear = ptb_max($myDatabase, 'year');