Monday, February 27, 2017

Using Multiple where condition and variables in laravel 5 MYSQL Query

This my query in which I want to use variables to be compared with the fields in the database table to get the price field from it.
 $price = DB::table('price')
       ->where([
    ['days_id', '=',  $days] , ['deals_id' , '=', $selected_deal]
        ])
       ->value('price');



via Abbas Ahmad

Advertisement