$query = "SELECT SUM(Veldspar) FROM hauled WHERE miningrun=2 AND hauler=1";
$result = mysql_query($query) or die(mysql_error());
$veldtotal = mysql_fetch_array($result);
printf("Results: %s<br>", $veldtotal);
printf("Length of array: %s<br>", count($veldtotal));
printf("Array into Int: %s<br>", (int)$veldtotal);
Why does the first printf return a blank variable?
All I want to be able to do is to get the sum of the query, and pass it to a variable to be displayed on the screen. Can anyone help with this?