I have three tables
member
- id
- name
- address
tax_bill
- bill_id
- member_id
- tax_amount
tax_receipt
- receipt_id
- member_id
- paid_amount
Out put:
Name | Address | Tax | Paid Tax
ABC | xyz | 100 |100
PQR | yte | 200 | Not paid
here "not paid" is the default value which is not there in receipt table the record is only in member and bill table.
From above tables i want to show the member details with his bill detail and receipt details. Initially the tax_receipt will be empty, When the user will pay the tax, the entry will be in the tax_receipt detail. I want to create a report in which all the members detail from member table, tax detail from tax_bill and receipt detail from tax_receipt will be displayed. What i want is to show ZERO if the record is not found in tax_receipt table for perticular member's tax_bill details.
Also, i am using join query so it will be usefull if suggestion will be using join query.
Thank you in advance :)