How to use union in zend db
问题 In sql i am using union i don't know how to write it in zend db. select m.*, 0 as is_shared from test m where user_id = $userId union select m.*,1 as is_shared from test m join test_shares ms where m.test_id = ms.test_id and ms.email_address = $email and m.url is not null; Please help me out.... I tried like this but no use $cols1 = array('test.*,0 as is_shared'); $select1 = $db->select () ->from ( 'test', $cols1 ) ->where ( 'user_id = ?', $userId); $cols2 = array('test_shares.*', '1 as is