What would be the right syntax to find the sum of money saved in plans where the status
is either abanadoned
or completed
:
$total = self::sum([
'column' => 'amount_saved_so_far',
'conditions' => 'status = "completed" AND user_id = :user_id:',
//find plans with a status of abandoned as well
'bind' => ['user_id' => $userId]
]);