title: MySQL query condition on joined tables
body: <p>I have the following MySQL Query (querying wordpress db):</p>
  
  <pre><code>SELECT wp_posts.ID, wp_posts.post_date, wp_posts.post_content, wp_posts.post_title, wp_terms.name, wp_term_taxonomy.taxonomy
  FROM wp_posts
  LEFT JOIN wp_term_relationships ON ( wp_term_relationships.object_id = wp_posts.ID ) 
  LEFT JOIN wp_term_taxonomy ON ( wp_term_taxonomy.term_taxonomy_id = wp_term_relationships.term_taxonomy_id )
  LEFT JOIN wp_terms ON ( wp_terms.term_id = wp_term_taxonomy.term_id) 
  WHERE 1=1
  AND wp_terms.name != 'MyTagName'
  AND wp_posts.post_type = 'post'
  AND (wp_posts.post_status = 'publish')
  ORDER BY wp_posts.post_date DESC 
  LIMIT 100
  </code></pre>
  
  <p>I am basically trying to STOP all 'wp_posts' coming back that have a tag (db table wp_terms) 'MyTagName'. But all the above seems to do is strip that tag name out from the rows returned, leaving the wp_post entry in there with the other tag entries it is tagged with.</p>
  
  <p>Can anyone help me with this?</p>