title: Mysql query returning resource id #8 instead of desired value
body: <p>Hi I am trying to discover how to fix my query to return the correct result. Here is my query:</p>
  
  <pre><code>$selectShoeRatingQuery = "SELECT cast(round(AVG(rating)*2)/ 2 as decimal(10,1)) FROM rating WHERE shoe_id = '$_GET[id]'";
  $shoeRating = mysql_query($selectShoeRatingQuery);
  </code></pre>
  
  <p>The query should return a number with one decimal place (3.5). It works fine when testing in PhpMyAdmin, however on my site it returns <code>resource id #8</code>.</p>
  
  <p>The database connection all works fine.</p>