title: mysql select timestamps between a and b returning all or 0 timestamps
body: <p>Tried this</p>
  
  <pre><code>select * from table where timestamp_field between 1330560000 and 1336170420
  </code></pre>
  
  <p>and this</p>
  
  <pre><code>select * from table where timestamp_field &gt;=1330560000 and timestamp_field&lt;=1336170420
  </code></pre>
  
  <p>both returning empty result set.</p>
  
  <p>But this</p>
  
  <pre><code>select * from table where timestamp_field &gt;= 1330560000
  </code></pre>
  
  <p>returns all the rows</p>
  
  <p>To make things more absurd</p>
  
  <pre><code>select * from table where timestamp_field &lt;= 1336170420
  </code></pre>
  
  <p>returns empty result set.</p>
  
  <p>Of course, there exists timestamp values before, between and after 1336170420=4.may 2012. and 1330560000=1.march 2012.</p>
  
  <p>Timestamp values are ok, at least phpmyadmin shows correct (human-readable) date-time values.
  I created timestamps by parsing strings, with</p>
  
  <pre><code>UPDATE table SET timestamp_field = STR_TO_DATE(timestamp_string, '%d.%m.%Y')
  </code></pre>
  
  <p>Guess I'm missing something, but can't find what!?</p>