fetching null value in php framework, laravel query builder -


i need laravel query builder fetch '' gdate union of query.

example below:

$unionquery = db::table('mt_task_category') ->wherein('role_id', [1]) ->select('null gdate', 'null user_id',           'category_id', 'category_name',           'null timesum', 'null gdfullname',           'null id', 'null pmfullname', 'null role_name'); 

you make use of db::raw()

$unionquery = db::table('mt_task_category')                 ->select(db::raw('null gdate', 'null user_id',                          'category_id', 'category_name',                          'null timesum' , 'null gdfullname',                          'null id', 'null pmfullname',                          'null role_name'));                 ->wherein('role_id', [1])                 ->get(); 

Comments

Popular posts from this blog

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

html - How to custom Bootstrap grid height? -

transpose - Maple isnt executing function but prints function term -