title: Warning: #1292 Incorrect datetime value
body: <p>Any ideas why the error <code>Warning: #1292 Incorrect datetime value: '1'</code> occurs in this MySQL query?</p>
  
  <pre><code>UPDATE dossiers SET
  attest_status = 'verstuurd'
  WHERE `datum_dossier` = (NOW() - INTERVAL 30 DAY &gt; datum_dossier) AND attest != 'geen'
  </code></pre>
  
  <p>Field <code>datum_dossier</code> is set as <code>date</code> and has no values of <code>0000-00-00</code>.</p>
  
  <p>I have another query that is working fine though:</p>
  
  <pre><code>UPDATE dossiers SET
  reden_vervallen = 'Automatisch na 30 dagen',
  datum_vervallen = NOW(),
  status = 'vervallen'
  WHERE soort = 'offerte' AND status = 'geoffereerd' AND (NOW() - INTERVAL 30 DAY &gt; datum_dossier)
  </code></pre>