ManaPHP\Mvc\Model::average PHP Метод

average() публичный статический Метод

What's the average price of robots? $average = Robots::average(array('column' => 'price')); echo "The average price is ", $average, "\n"; What's the average price of mechanical robots? $average = Robots::average(array("type='mechanical'", 'column' => 'price')); echo "The average price of mechanical robots is ", $average, "\n";
public static average ( string $column, string | array $parameters = null, integer | array $cacheOptions = null ) : double
$column string
$parameters string | array
$cacheOptions integer | array
Результат double
    public static function average($column, $parameters = null, $cacheOptions = null)
    {
        return (double) self::_groupResult('AVG', 'average', $column, $parameters, $cacheOptions);
    }