protected function executeAggregate($fn, $table, $field, $conditions)
    {
        $data = $this->selectAll($table, $conditions, $fn . '(' . $field . ')');
        return $data ? (float)current($data[0]) : 0.0;
    }
protected function executeAggregate($fn, $table, $field, $conditions)
    {
        $data = $this->selectAll($table, $conditions, $fn . '(' . $field . ')');
        return $data ? (float)current($data[0]) : 0.0;
    }
protected function executeAggregate ( $ fn , $ table , $ field , $ conditions ) { $ data = $ this -> selectAll ( $ table , $ conditions , $ fn . '(' . $ field . ')' ) ; return $ data ? ( float ) current ( $ data [ 0 ] ) : 0.0 ; }
Execute a query with aggregate function

@param string $fn
@param string $table
@param string $field
@param mixed $conditions
@return float
Execute a query with aggregate function