src/ORM/DataQuery.php
public function subtract(DataQuery $subtractQuery, $field = 'ID')
    {
        $fieldExpression = $subtractQuery->expressionForField($field);
        $subSelect = $subtractQuery->getFinalisedQuery();
        $subSelect->setSelect(array());
        $subSelect->selectField($fieldExpression, $field);
        $subSelect->setOrderBy(null);
        $subSelectSQL = $subSelect->sql($subSelectParameters);
        $this->where(array($this->expressionForField($field) . " NOT IN ($subSelectSQL)" => $subSelectParameters));

        return $this;
    }
public function subtract(DataQuery $subtractQuery, $field = 'ID')
    {
        $fieldExpression = $subtractQuery->expressionForField($field);
        $subSelect = $subtractQuery->getFinalisedQuery();
        $subSelect->setSelect(array());
        $subSelect->selectField($fieldExpression, $field);
        $subSelect->setOrderBy(null);
        $subSelectSQL = $subSelect->sql($subSelectParameters);
        $this->where(array($this->expressionForField($field) . " NOT IN ($subSelectSQL)" => $subSelectParameters));

        return $this;
    }
public function subtract ( DataQuery $ subtractQuery , $ field = 'ID' ) { $ fieldExpression = $ subtractQuery -> expressionForField ( $ field ) ; $ subSelect = $ subtractQuery -> getFinalisedQuery ( ) ; $ subSelect -> setSelect ( array ( ) ) ; $ subSelect -> selectField ( $ fieldExpression , $ field ) ; $ subSelect -> setOrderBy ( null ) ; $ subSelectSQL = $ subSelect -> sql ( $ subSelectParameters ) ; $ this -> where ( array ( $ this -> expressionForField ( $ field ) . " NOT IN ($subSelectSQL)" => $ subSelectParameters ) ) ; return $ this ; }
Removes the result of query from this query.

@param DataQuery $subtractQuery
@param string $field
@return $this
Removes the result of query from this query .