Laravel orm 查询
我有一个表格transaction_details
cta scta sscta charge
102 1 1 80.00
102 1 1 5.00
102 1 2 20.00
102 1 2 2.00
105 1 0 30.00
105 2 0 50.00
107 1 0 45.00
107 1 0 71.00
例如,我想从账户 102 1 2 到账户 105 1 0 进行查询
我只取得了以下成就:
$transaction_details = TransactionDetails::whereBetween('cta', [ 102, 105 ])->get();
我想从账户 cta(102) scta(1) sscta(2) 查询到账户 cta(105) scta(2) sscta(0):
cta scta sscta charge
102 1 2 20.00
102 1 2 2.00
105 1 0 30.00
105 2 0 50.00