title: Exclude results where two fields are not of certain values
body: <p>I have two tables which have some transactional stuff stored in them. There will be many records per <code>user_id</code> in each table. Table1 and Table2 have a one-to-one relationship with each other. I want to pull records from both tables, but I want to exclude records which have certain values in <strong>both</strong> tables. I don't care if they both don't have these values, or if just one does, but both tables should not have both values.</p>
  
  <p>For example:</p>
  
  <pre><code>SELECT t1.id, t1.type, t2.name
    FROM table1 t1
    INNER JOIN table2 t2 ON table.xid = table2.id
    WHERE t1.user_id = 100
    AND (t1.type != 'FOO' AND t2.name != 'BAR')
  </code></pre>
  
  <p><br/>
  So <code>t1.type</code> is type <code>ENUM</code> with about 10 different options, and <code>t2.name</code> is also type <code>ENUM</code> with 2 options.</p>
  
  <p>My expected results would look a little like:</p>
  
  <pre><code>1, FOO, YUM
  2, BOO, BAR
  3, BOO, YUM
  </code></pre>
  
  <p>But instead, all I'm getting is:</p>
  
  <pre><code>3, BOO, YUM
  </code></pre>
  
  <p>It appears to be filtering out all records which has 'FOO' as the type, and 'BAR' as the name.</p>
  
  <p>(<em>We're using MySQL 5.1...</em>)</p>