Support the ongoing development of Laravel.io →
Jacoby6000

Jacoby6000

Joined 9 Jul 2014

Statistics

Threads 0
Replies 1
Solutions 1
Articles 0

jacoby6000 has not posted any threads yet

replied 11 years ago

Get sum of column WHERE an id matches

You've simply got it backwards. $balance = DB::table('data')->where('user_id' '=' $id)->sum('b...

0 Likes
Solved

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2026 Laravel.io - All rights reserved.