title: Select Mysql with multiple greater and lower values
body: <p>i am in need of a search query based on 6 values from 3 columns day, month, year, right now i have got it some how working only for month and year but i can not get the day to perform correctly.</p>
  
  <p>for example if some one wants to search from day, month year to day month year.
  my current query </p>
  
  <pre><code>    //From
      list($fy,$fm,$fd)   = explode ('-', 2013-2-20);
      //to
      list($ty,$tm,$td)   = explode ('-', 2014-9-1);
  
      $add = " AND 
              ( month &gt;= '".$fm."'
              AND year &gt;='".$fy."') AND ( 
              month &lt;= '".$tm."' 
              AND year &lt;=   '".$ty."'
              ) ";
  </code></pre>
  
  <p>as you can see the day is not included, your time is much appreciated. </p>