Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

select sum in laravel

Sometime for such queries you need to disable the strict check
 So inside config/database.php and inside mysql, 
 Set 'strict' => false,

->select('user_id', DB::raw('SUM(points) as total_points'))
 
PREVIOUS NEXT
Tagged: #select #sum #laravel
ADD COMMENT
Topic
Name
4+7 =