Mvc\Model::maximum

public static mixed maximum ([array $parameters])

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

//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
2016-10-16 09:52:53
Comments
Leave a Comment

Please login to continue.