title: select * from table where datetime in month (without breaking index)
body: <p>I have a bunch of timestamped rows (using the 'datetime' data type)</p>
  
  <p>I want to select all the rows that have a timestamp that is within a particular month.</p>
  
  <p>The column is indexed so I can't do MONTH(timestamp) = 3 because that'll make this index unuseable.</p>
  
  <p>If I have year and month variables (in perl), is there a horrific bit of SQL I can use like:</p>
  
  <pre><code>timestamp BETWEEN DATE($year, $month, 0) AND DATE($year, $month, 31);
  </code></pre>
  
  <p>But nicer, and actually works?</p>