Answer the question
In order to leave comments, you need to log in
How to add an AND condition to leftJoin?
Good day!
I don't understand how to use the construction of the form:
SELECT *
FROM table1 AS t1
LEFT JOIN table2 as t2
ON t1.a = t2.b
LEFT JOIN table3 AS t2
ON t1.a = t3.b
AND t2.a = t3.c
WHERE t1.d = 7
orOn
either where
:DB::table('users')
->join('contacts', function ($join) {
$join->on('users.id', '=', 'contacts.user_id')->orOn(...);
})
->get()
->and(...)
->andOn(...)
Tried - does not work :)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question