我有三张桌子 命名为 tbl_savac_client .....包含ac_no,Member_name,blance 另外两张桌子 一个是: tbl_savac_posting ....包含tbl_savac_posting
和最后一个表tbl_withdraw_posting 我运行了一个SQL查询,它给了我这个结果Unexpexted Result 我希望Result表包含member_name,来自第一个表的blance和来自另外两个表的预期coloum数据。
我的Sql查询是:
SELECT sc.ac_no, sc.blance, sc.member_name, sp.date,wp.date,sp.installment,sp.description,sp.mr_no,wp.wit_amnt,wp.description,wp.mr_no FROM tbl_savac_client sc left join (Select ac_no,mr_no,date, installment, description from tbl_savac_posting) sp on sc.ac_no=sp.ac_no left join (select ac_no, date, description, wit_amnt,mr_no from tbl_withdraw_posting ) wp on sc.ac_no=wp.ac_no WHERE sc.ac_no = '$ac_no' and sp.date BETWEEN '".$start_date."' AND '".$end_date."'