Hi,
I have two queries that I need to join to create one bigger query. The following work seperatley:
SELECT vouchers.*, special_days_vouchers.*, special_days.*
FROM (vouchers LEFT JOIN special_days_vouchers ON vouchers.ID = special_days_vouchers.ID)
LEFT JOIN special_days ON (special_days_vouchers.special_days_id = special_days.special_days_id)
SELECT vouchers.*, voucher_type.*
FROM (vouchers LEFT JOIN voucher_type_lookup ON vouchers.ID = voucher_type_lookup.ID)
LEFT JOIN voucher_type ON (voucher_type_lookup.voucher_type_id =voucher_type.voucher_type_id)
but I can't seem to find the right structure to combine them. Any help greatly appreciated.
I have two queries that I need to join to create one bigger query. The following work seperatley:
SELECT vouchers.*, special_days_vouchers.*, special_days.*
FROM (vouchers LEFT JOIN special_days_vouchers ON vouchers.ID = special_days_vouchers.ID)
LEFT JOIN special_days ON (special_days_vouchers.special_days_id = special_days.special_days_id)
SELECT vouchers.*, voucher_type.*
FROM (vouchers LEFT JOIN voucher_type_lookup ON vouchers.ID = voucher_type_lookup.ID)
LEFT JOIN voucher_type ON (voucher_type_lookup.voucher_type_id =voucher_type.voucher_type_id)
but I can't seem to find the right structure to combine them. Any help greatly appreciated.