Hello everybody,
I’m doing some changes on a clients website but i’m not experienced php developer.
I’m trying to get total of values of a column called “amount” in a table called “withdraws”
I have this code:
$totalWithdrawls = $this->Users->Withdraws->find()->sumOf(‘amount’);
Which return the content as an array (5,10,15,20)
I want to get the total of them (50) as a number.
how to achieve that?
Thank you in advance.