I have code:
$balanceModelCredit = new Model_BalanceCredit();
$balanceModelDebt = new Model_BalanceDebt();
$selectQueryDebt = $balanceModelDebt->select()
->from('balance_debt', array('date',
'amount',
'description',
new Zend_Db_Expr('"koszta"')
));
$selectQueryDebt->where('balance_id=?', $balance_id);
$selectQueryCredit = $balanceModelCredit->select()
->from('balance_credit', array('date',
'amount',
'description',
new Zend_Db_Expr('"przychod"')
));
$selectQueryCredit->where('balance_id=?', $balance_id);
How can I do UNION statement?
UNIONonly need to have equal columns count and same column types but it does not matter about column names, ... - php-dev