Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

case inside laravel query

DB::table('ref')->select(['id','name',DB::raw('(case when (id > 17) then "yes" else "no" end) as present')])->get();
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #case #laravel #query
ADD COMMENT
Topic
Name
3+3 =