Код: Выделить всё
SELECT 'Income' as source, fld_type, fld_amount, ta.fld_account as account, fld_date, tbl_revenue.fld_description as fld_traninfo, tbl_revenue.fld_created as created
FROM tbl_revenue
JOIN tbl_accounts as ta on tbl_revenue.fld_account_id = ta.fld_id
UNION
SELECT 'Expense' as source, fld_type, fld_amount, tae.fld_account, fld_date, tbl_payment.fld_description as fld_traninfo, tbl_payment.fld_created as created
FROM tbl_payment
JOIN tbl_accounts as tae on tbl_payment.fld_account_id = tae.fld_id
< /code>
Есть ли способ использовать строитель запросов в этом запросе?WHERE source like "%a%" limit(10,0)
Подробнее здесь: https://stackoverflow.com/questions/491 ... ion-of-two