Mvc\Model::minimum

public static mixed minimum ([array $parameters])

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

//What is the minimum robot id?
 $id = Robots::minimum(array('column' => 'id'));
 echo "The minimum robot id is: ", $id;

 //What is the minimum id of mechanical robots?
 $sum = Robots::minimum(array("type='mechanical'", 'column' => 'id'));
 echo "The minimum robot id of mechanical robots is ", $id;
doc_Phalcon
2016-10-16 09:52:54
Comments
Leave a Comment

Please login to continue.