title: MYSQL select field1, field2 only where field1 or field2 does not equal text
body: <p>I have the following 2 SQL syntax that I'm looking to combine into 1 SQL syntax</p>
  
  <pre><code>SELECT sentFrom 
  FROM tableName 
  WHERE id = :varid 
  AND sentFrom != :vartext
  
  SELECT sentTo 
  FROM tableName 
  WHERE id = :varid 
  AND sentTo != :vartext
  </code></pre>
  
  <p>I guess I should give an example:</p>
  
  <p>MYSQL TABLE</p>
  
  <pre><code>-----------------------------------
  sentFrom          sentTo
  1                 2
  1                 3
  2                 1
  2                 3
  </code></pre>
  
  <p>query </p>
  
  <pre><code>select sentFrom where sentFrom != 1 and select sentTo where sentTo != 1
  </code></pre>
  
  <p>Returns:</p>
  
  <p>sentTo 2 but not sentFrom 1</p>
  
  <p>sentTo 3 but not sentFrom 1</p>
  
  <p>sentFrom 2 but not sentTo 1</p>
  
  <p>sentFrom 2 and sentTo 3</p>