Hello,
How do you do a multi-level join on tables that are not linked to the table specified in ->query ?
select distinct
GBAT.GroupBatchID,
AIRL.Name as AirlineName,
GBAT.CreateDate,
GBAT.CreateTime,
GBAT.BatchNote,
GBAT.GroupType
from
dba.groupbatches GBAT,
dba.HotelTranDetail HTRD,
dba.HotelTrans HTRN,
dba.BATCHES BAT,
dba.AIRLINES AIRL
where
HTRD.PostingGBatchID = GBAT.GroupBatchID and
HTRN.HTRANSID = HTRD.HTransID and
BAT.BatchID = HTRN.BATCHID AND
AIRL.AirlineID = BAT.AIRLINEID and . <<----
GBAT.CreateDate >= '{$d}' AND
GBAT.GroupType = {$t}
My start...
$this->src('mysource')->query(MYSQL::type(
DB::table('HotelTranDetail')
->join('GroupBatches', 'PostingGBatchID', '=', 'GroupBatchID')
->join('HotelTrans', 'HTransID', '=', 'HTransID')
->join('Batches', 'BatchID', '=', 'BatchID')
->join('Airlines', 'Batches.BatchID', '=', 'BatchID') . <<--- Airlines is related to Batches, not HotelTranDetail
....
Thank you.
David