Hello there...
I tried mysql_fetch_rows and got this:
The average score was: Array . as a result...here is the code snippet:
<?php
$query2 = "SELECT avg(score) from sp_t_results_World_Capitals";
$result2 = mysql_query($query2);
$row2 = mysql_fetch_row($result2);
echo "The average score was: $row2 .";
?>
So then I tried mysql_fetch_array....
<?php
$query2 = "SELECT avg(score) from sp_t_results_World_Capitals";
$result2 = mysql_query($query2);
$row2 = mysql_fetch_array($result2);
echo "The average score was: $row1[1] .";
?>
The result was a blank.
So now, two things....
#1 Since i'm kind-a-new I am not sure if I'm calling the variable properly in this last line.
#2 Why would array be what I get back? I was expecting a single value?
Any thoughts....?????