Mvc\Model::maximum

public static mixed maximum ([array $parameters])

Allows to get the maximum value of a column that match the specified conditions

1
2
3
4
5
6
7
//What is the maximum robot id?
 $id = Robots::maximum(array('column' => 'id'));
 echo "The maximum robot id is: ", $id, "\n";
 
 //What is the maximum id of mechanical robots?
 $sum = Robots::maximum(array("type='mechanical'", 'column' => 'id'));
 echo "The maximum robot id of mechanical robots is ", $id, "\n";
doc_Phalcon
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.