how to pass php variable in mysql laravel database

Solutions on MaxInterview for how to pass php variable in mysql laravel database by the best coders in the world

showing results for - "how to pass php variable in mysql laravel database"
Soline
26 May 2016
1$data = DB::select(DB::raw("SELECT pur_price FROM productpricing WHERE
2                        mst_uid = (SELECT 
3                                mst_uid
4                            FROM
5                                master_material
6                            WHERE prd_id = :product_id
7                                    AND mtl_id = :material
8                                    AND color_id = :color
9                                    AND mtl_status ='1')
10                                     AND ($size between pur_sqft1 AND ifnull(pur_sqft2,$size))"),
11                                    array('product_id'      =>$product_id,
12                                             'material'     =>$material,
13                                             'color'        =>$color,                                                 
14                                    ));
15