src/NotORM/Result.php
function aggregation($function){
        $join  = $this->createJoins(implode(",", $this->conditions) . ",$function");
        $query = "SELECT $function FROM $this->table" . implode($join);
        if($this->where){
            $query .= " WHERE " . implode($this->where);
        }

        foreach($this->query($query, $this->parameters)->fetch() as $return){
            return $return;
        }
    }
function aggregation($function){
        $join  = $this->createJoins(implode(",", $this->conditions) . ",$function");
        $query = "SELECT $function FROM $this->table" . implode($join);
        if($this->where){
            $query .= " WHERE " . implode($this->where);
        }

        foreach($this->query($query, $this->parameters)->fetch() as $return){
            return $return;
        }
    }
function aggregation ( $ function ) { $ join = $ this -> createJoins ( implode ( "," , $ this -> conditions ) . ",$function" ) ; $ query = "SELECT $function FROM $this->table" . implode ( $ join ) ; if ( $ this -> where ) { $ query .= " WHERE " . implode ( $ this -> where ) ; } foreach ( $ this -> query ( $ query , $ this -> parameters ) -> fetch ( ) as $ return ) { return $ return ; } }
Execute aggregation function

@param string $function

@return string
Execute aggregation function