所以,我有表prices
與結構:得到的所有條目的總和
+----+--------+
| id | reward |
+----+--------+
| 1 | 721 |
+----+--------+
| 2 | 54 |
+----+--------+
| 3 | 99 |
+----+--------+
,我用這個方法來概括所有獎勵:
'withdrawals' => \App\Tradeoffer::where('type', 'withdraw')
->where('completed', 1)
->where('declined', 0)
->where('timeout', 0)
->where('created_at', '>', (time() - $hours))
->sum('reward')
和響應:7215499而不是所有條目的總和。這是爲什麼?如何處理它?
嗯,這些東西是字符串還是數字? (1) – Roope
列爲int(11) –