title: How to get an integer output from an SQL query
body: <p>I have an SQL query as follows:</p>
  
  <pre><code>    $tagID = mysql_query("SELECT tagID FROM tags WHERE tagName = '$tag'");
       echo $tagID;
  </code></pre>
  
  <p>I want $tagID to contain something like 3, or 5, or any integer. But when I echo it, the output is:</p>
  
  <pre><code>resource id #4
  </code></pre>
  
  <p>How can I make it a simple integer?</p>