title: PHP - MySQL: Get rows from table where date between two dates
body: <p>I've got a problem with mysql getting the rows between two dates.</p>
  
  <p>The column is <code>res_birthday (VARCHAR)</code> and the date looks like <code>30.11.1970</code>.</p>
  
  <p>Now I have to get customers whose birthdays are between <code>01.01.</code> and <code>10.01.</code>, the year doesn't matter.</p>
  
  <p>I've tried many solutions with: </p>
  
  <pre><code>STR_TO_DATE(`res_birthday`, '%d.%m')
  </code></pre>
  
  <p>but I cannot compare it to the start and end date.</p>
  
  <p>Any idea how I can solve this?</p>
  
  <h2>Edit:</h2>
  
  <p>Here is some code with the solutions mentioned below, but it does not work.</p>
  
  <pre><code>$query = mysql_query("SELECT * FROM `jtmpl2_chronoforms_data_test_reservierung` WHERE MONTH(STR_TO_DATE(`res_birthday`, '%d.%m.%y')) = 5 AND DAYOFMONTH(STR_TO_DATE(`res_birthday`, '%d.%m.%y')) = 10;");
  
       while($info = mysql_fetch_array( $query )) 
  
  
  
      function createCodeOrg($query){
       while($info = mysql_fetch_array( $query )) 
      { 
          $code = '&lt;tr&gt;
                              &lt;td&gt;'.$info['res_anrede'].'&lt;/td&gt;
                          &lt;td&gt;'.ucfirst($info['res_vorname']).'&lt;/td&gt;
                          &lt;td&gt;'.ucfirst($info['res_nachname']).'&lt;/td&gt;
                          &lt;td&gt;'.ucfirst($info['res_strasse_hnr']).'&lt;/td&gt;      
                          &lt;td&gt;'.$info['res_plz'].'&lt;/td&gt;               
                          &lt;td&gt;'.ucfirst($info['res_ort']).'&lt;/td&gt;
                          &lt;td&gt;'.$info['res_geburtstag'].'&lt;/td&gt;    
                          &lt;td&gt;&lt;a href="mailto:'.$info['res_email'].'"&gt;'.$info['res_email'].'&lt;/a&gt;&lt;/td&gt;                 
  
                        &lt;/tr&gt;';
  
      echo $code;
      } 
  }
  </code></pre>