Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

Laravel - multiple select query

$top_orders = OrderItem::select('name','productId', DB::raw('count(name) as total'))
  ->groupBy('name','productId')
  ->orderBy('total','desc')
  ->take(5)
  ->get();
Source by coreui.io #
 
PREVIOUS NEXT
Tagged: #Laravel #multiple #select #query
ADD COMMENT
Topic
Name
6+7 =