title: Wordpress SQL statement to exclude certain category
body: <p>I am wondering how I can rework this statement to exclude a certain category, ie. category id = 14</p>
  
  <p>Please note that the wordpress categories are in a different table.</p>
  
  <p>referenced as <code>term_relationships</code> and the category is <code>term_taxonomy_id</code></p>
  
  <pre><code>&lt;?php 
  $now = gmdate("Y-m-d H:i:s", strtotime('0 days'));
  
  $request = $wpdb-&gt;prepare("SELECT ID, post_title, post_date, post_excerpt,LEFT(post_content,$sqllimit) AS short_post_content FROM $wpdb-&gt;posts WHERE post_status = 'publish' ");
  if($hide_pass_post) $request .= "AND post_password ='' ";
  if($include_pages) $request .= "AND (post_type='post' OR post_type='
  else $request .= "AND post_type='post' ";
  
  $request .= "AND post_date_gmt &gt; '$now' ORDER BY post_date ASC LIMIT $skip_posts, $returnnum";
  $posts = $wpdb-&gt;get_results($request); ?&gt;
  </code></pre>