Zend Framework Select Objects And UNION()

前端 未结 6 2002
南旧
南旧 2020-12-30 16:16

I\'m pretty sure this is not possible in Zend Framework (I have searched the Web, the documentation and issue tracker) but I just want to make sure so I\'m asking here.

6条回答
  •  孤独总比滥情好
    2020-12-30 17:18

    This is how it works for me:

    $select1 = $this->select();               
    $select2 = $this->select();
    

    After getting the necessary data in both queries the UNION syntax goes like this:

     $select = $this->select()->union(array('('.$select1.')', '('.$select2.')'));  
    

提交回复
热议问题