title: Search with PHP for calendar dates within a MySQL array?
body: <p>I'm building a calendar and I'm really dumb when it comes to arrays.
  First of all, I need to query my database, so:</p>
  
  <pre><code>
  $events = mysql_query ("SELECT id,title,date WHERE date BETWEEN 2009-01-01 AND 2009-01-31")
  or die(mysql_error());
  </code></pre>
  
  <p>So, now I need to order those events so, when I'm echoing my calendar table, I can check this array for events.
  In this great <a href="http://davidwalsh.name/php-calendar" rel="nofollow noreferrer">Calendar written by David Walsh</a>, he does a query for every day, but I suppose it would be a performance nightmare.
  So...any ideas how can I do this?</p>