Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

add like and equal in same query in laravel

$data = DB::table('borrowers')
        ->join('loans', 'borrowers.id', '=', 'loans.borrower_id')
        ->select('borrowers.*', 'loans.*')   
        ->where('loan_officers', 'like', '%' . $officerId . '%')
        ->where('loans.maturity_date', '<', date("Y-m-d"))
        ->get();
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #add #equal #query #laravel
ADD COMMENT
Topic
Name
1+5 =