title: Wordpress: Using the category slug get the category ID using mysql query
body: <p>basically, I have a cookie with the category slug stored, using this data I want to query the database and return the ID of the category.</p>
  
  <p>I am new to mysql and this seems like an advanced query that may need to use joins, any help or guidance would be much appreciated.</p>
  
  <p>Thank you!</p>
  
  <p>Reference:
  <a href="http://codex.wordpress.org/File:WP3.0-ERD.png" rel="nofollow">http://codex.wordpress.org/File:WP3.0-ERD.png</a></p>