ZF-2856: Add method for UNION
Description
It would be nice if a UNION method was eventually added to Zend_Db_Select. If I get a bit (ha, that'll happen), I'll try to write a patch for it if nobody gets to it first.
It would be nice if a UNION method was eventually added to Zend_Db_Select. If I get a bit (ha, that'll happen), I'll try to write a patch for it if nobody gets to it first.
Comments
Posted by Apaella (apaella) on 2008-03-21T06:50:37.000+0000
Maybe a method of Zend_Db_Adapter?
$sql = $db->union(array($sel1, $sel2, $sel3));
I write $sql because it wouldn't be a Zend_Db_Select instance... i.e. I can't call a where() after the union...
Posted by Wil Sinclair (wil) on 2008-03-25T20:57:43.000+0000
Please categorize/fix as needed.
Posted by Simon Mundy (peptolab) on 2008-04-04T19:29:00.000+0000
Actually, I do think this belongs to the Zend_Db_Select as it is part of constructing a query and you can also manipulate the 'having', 'order' and 'limit' clauses.
I'm testing a prototype now and will release to the incubator when the unit tests have been written.
Posted by Simon Mundy (peptolab) on 2008-05-30T18:57:23.000+0000
Resolved in r9170 - documentation to be updated shortly
Posted by Wil Sinclair (wil) on 2008-09-02T10:39:12.000+0000
Updating for the 1.6.0 release.