DbQuery: Add method union()

This commit is contained in:
Johannes Meyer 2015-12-03 13:50:01 +01:00
parent 9587c363f6
commit 28cd9681c8
1 changed files with 14 additions and 0 deletions

View File

@ -577,4 +577,18 @@ class DbQuery extends SimpleQuery
$this->select->joinNatural($name, $cols, $schema);
return $this;
}
/**
* Add a UNION clause to the query
*
* @param array $select Select clauses for the union
* @param string $type Type of UNION to use
*
* @return $this
*/
public function union($select = array(), $type = Zend_Db_Select::SQL_UNION)
{
$this->select->union($select, $type);
return $this;
}
}