title: MySQL Query for Tagging System, Selecting Used Tags Only
body: <p>I have a tagging system implemented in PHP and MySQL, with the following tables:</p>
  
  <p>Table: blog_tags</p>
  
  <ul>
  <li>tag_id</li>
  <li>tag_name</li>
  </ul>
  
  <p>Table: blog_tags_assoc</p>
  
  <ul>
  <li>tag_assoc_id</li>
  <li>article_id</li>
  <li>tag_id</li>
  </ul>
  
  <p>Table: blog_articles</p>
  
  <ul>
  <li>article_id</li>
  <li>article_title</li>
  <li>article_content</li>
  </ul>
  
  <p>I have them all linked using the Many to Many relationship 
  (reference to something similar: <a href="https://stackoverflow.com/questions/1819934/how-to-store-tags-in-mysql-tags-one-field-in-total-or-one-filed-for-each-tag">How to store tags in MySQL tags, one field in total or one filed for each tag?</a>)</p>
  
  <p>What I'm trying to do now is make a MySQL query that selects all the tags from blog_tags that have actually been referenced by the articles in blog_articles.</p>
  
  <p>So far, I know that "HAVING" is something I might use…but I'm not sure how?
  Any ideas or suggestions would be most welcome.  Thanks!</p>