eZ\Publish\Core\Persistence\Doctrine\SelectDoctrineQuery::selectDistinct PHP Method

selectDistinct() public method

selectDistinct() accepts an arbitrary number of parameters. Each parameter must contain either the name of a column or an array containing the names of the columns. Each call to selectDistinct() appends columns to the list of columns that will be used in the query. Example: $q->selectDistinct( 'column1', 'column2' ); The same could also be written $columns[] = 'column1'; $columns[] = 'column2; $q->selectDistinct( $columns ); or using several calls $q->selectDistinct( 'column1' )->select( 'column2' ); Each of above code produce SQL clause 'SELECT DISTINCT column1, column2' for the query. You may call select() after calling selectDistinct() which will result in the additional columns beein added. A call of selectDistinct() after select() will result in an \eZ\Publish\Core\Persistence\Database\SelectQueryInvalidException.
public selectDistinct ( ) : eZ\Publish\Core\Persistence\Database\SelectQuery
return eZ\Publish\Core\Persistence\Database\SelectQuery returns a pointer to $this.
    public function selectDistinct()
    {
        $this->distinct = true;
        return call_user_func_array(array($this, 'select'), func_get_args());
    }