@david001 This is fine, problem lies somewhere else in your code.
Feb 7, 2016
3
Level 5
join not working as expected
I have a table name payments,sold_pin and claim_users. I need to fetch data form payments ,sold_pin and claim_users if only status(column_name) of sold_pin is 1
$payments = DB::table('payments')
->join('claim_users','payments.product_id','=','claim_users.product_id')
->join('sold_pin','payments.product_id','=','sold_pin.product_id')
->where('sold_pin.status','=',1)
->get();
But i got all results as i should get results only if status of sold_pin is 1
Three are 3 records in my payments,sold_pin and claim_users table and all have table same product_id.
I should get 3 records but i got 8 records
Please or to participate in this conversation.