ZF-2856: Add method for UNION

Issue Type: Improvement Created: 2008-03-11T01:02:52.000+0000 Last Updated: 2008-09-02T10:39:12.000+0000 Status: Resolved Fix version(s): - 1.6.0 (02/Sep/08)

Reporter: C Snover (snover) Assignee: Simon Mundy (peptolab) Tags: - Zend_Db_Select

Related issues: Attachments:


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.


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.

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.