11-01-2017, 02:35 PM
If you're still having a problem with this and getting your query right, you can do something like this.
It's important to establishoutside of your foreach loop first.
Code:
$count = 0;
Code:
$query = $db->query("SELECT sendout FROM sendouts")->results();
Code:
foreach ($q as $sum){
Code:
$count = $count + $sum->sendout;
Code:
}
Code:
echo $count;
It's important to establish
Code:
$count = 0