title: Php Mysql Search Between Two Dates
body: <p>I've mysql table like this:</p>
  
  <pre><code>id      start_date         username
  1       2013-04-04         18
  2       2013-03-31         19
  3       2013-04-04         19
  4       2013-04-02         19 
  5       2013-04-03         18
  </code></pre>
  
  <p>I'm trying to get <strong>username</strong> where start_date is between 2013-03-31 to 2013-05-01 with following query:</p>
  
  <pre><code>// $from = 2013-03-31 and $to = 2013-03-01 (example)
  
  $search = mysql_query("SELECT username FROM oc_calendar WHERE start_date &gt;'$from' AND 
  start_date &lt; '$to'"); 
  $re_search = mysql_fetch_array($search);
  echo $search_p_id = $re_search['username']; 
  </code></pre>
  
  <p>But It's just print username = 18, It's should be print 18 and 19 number username. why it's doesn't show? Any idea?</p>