Apr 17, 2020
1
Level 1
Query into where clause ?
Hi, anyone help me please,
i have this query:
$allUser = DB::table('users')->join('anything','example.id,'=','example.id') ->select('example.name')
->where([ ['example.id', $hereIwantAnotherValueOfTheQuery],['example.exm'] ])->get();
but : $hereIwantanotherValueOfTheQuery is another query that i write before, i want know if there are some method to add a query(select id from banks where id=id_bu)) into the where clause. thanks regards.
hereIwantanotherValueOfTheQuery = ->select id from banks where id=id_bu
Please or to participate in this conversation.