Answered
Resource id error
Hi i am wanting to get the average of a record set, I have
the following query
<?php
$sum = mysql_query("SELECT AVG(Rating) FROM Project_1_Rate");
?>
and then the following display
<?php echo $sum ?>
When i test it i get the following display
Resource id #8
I have never seen this before, the code seems right but if anyone has suggestions then they will be much appreciated.
<?php
$sum = mysql_query("SELECT AVG(Rating) FROM Project_1_Rate");
?>
and then the following display
<?php echo $sum ?>
When i test it i get the following display
Resource id #8
I have never seen this before, the code seems right but if anyone has suggestions then they will be much appreciated.
