I am getting the total $ on the system with
$sql=" SELECT SUM(credit) as total_credit FROM results ";
$this->src('substantiator')
->query($sql)
->pipe($this->dataStore("total_credits"));
and then this in the view file:
echo $this->dataStore('total_credits')->sum("total_credit");
I'd like total_credit to appear as $ and with commas. for example $x,xxx,xxx. How can I do this? What is the largest amount that total_credit can be?