What is wrong with this code?
$data455 = mysql_query("SELECT ROUND(SUM(gainloss), 4) FROM stats WHERE MONTH(date) = MONTH(CURRENT_TIMESTAMP) AND winloss = 'Win'");
$info455 = mysql_fetch_array($data455);
$testarray = array_sum($info455);
echo $testarray;
It does not display the correct sum. I want to get the sum of the last column where 'winloss' = 'win'
the output $testarray gives is 79.5843, but the correct sum is 41.6609.
Here is what my database looks like.
