Code: Select all
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>
Gibt es eine Möglichkeit, in dieser Abfrage einen Abfragebäfte zu verwenden?WHERE source like "%a%" limit(10,0)
Mobile version