(1)I wont to build query like: ----------------------------------------------------- SELECT * FROM tbl_a A1 INNER JOIN tbl_b B ON A1.b_id=B.id, tbl_a A2 WHERE ... -----------------------------------------------------
(2)I wrote it by query builder: ----------------------------------------------------- \DB::select() ->from( array('tbl_a', 'A1') ) ->join( array('tbl_b', 'B'), 'INNER' ) ->on('A1.b_id', '=', 'B.id') ->from( array('tbl_a', 'A2') ) ->where... -----------------------------------------------------
(3)result: ----------------------------------------------------- SELECT * FROM tbl_a A1, tbl_a A2 INNER JOIN tbl_b B ON A1.b_id=B.id WHERE ...