title: MySQL PHP for SELECT AVG(column) returns Resource ID 3
body: <p>I want to get the average value of my ratings column for my review table.
  This is what has been done so far</p>
  
  <pre><code>$averagereviewquery = "SELECT AVG(review_rating) from reviews where product_id=".$primarykey;               
  $averagereviewresult=mysql_query($averagereviewquery);
  
                  if($insert_review){ //successful insert
                      echo $averagereviewresult;
                  }
  </code></pre>
  
  <p>what happens is averagereviewresult returns "Resource Id 3". What do i do to change it to show me the average value?</p>