title: MySQL returns huge result but shouldn't
body: <p>I have two tables, lets name them <em>table1</em> and <em>table2</em>.</p>
  
  <p><em>Table1</em> stores a date in plain format dd.mm.yyyy, <em>table2</em> stores a date as UNIX timestamp.</p>
  
  <p>Now, I want to select some fields from <em>table1</em> where the date IS NOT the date in <em>table2</em>. I built this query:</p>
  
  <pre><code>SELECT 
      table1.field1,
      table1.field2,
      table1.field3,
      table1.THEDATE
  FROM
      table1,
      table2
  WHERE
      table1.THEDATE&lt;&gt; FROM_UNIXTIME(table2.THEUNIXDATE, '%d.%m.%Y')
  </code></pre>
  
  <p>To compare the two dates, I am converting the UNIX timestamp to the format in which the date from <em>table1</em> is given.</p>
  
  <p>I don't know if the conversion or the comparision fails, but I get a huge result (last time I aborted the query was at 1 million rows). I think I am messing up with the cartesian product, but I can't figure out where and why.</p>