title: Select using LIKE between 2 ranges in mysql
body: <p>I'm trying to get all the values out of a database table between 2 different dates.  The problem is my date column contains dates as a string in the format 'MM/DD/YYYY HH:MM'(i.e. 9/13/2012 13:15, 10/14/2012 22:32, 11/8/2012 12:10 etc).  I am able to use a SELECT and LIKE query to get all the rows that contain whatever date string is passed in, by itself, but I need to select all the rows between a certain range (like between 9/13/2012 and 9/15/2012).  Do I need to do a conversion to a date format to make this work?  </p>
  
  <p>This is the code that is working by inputting one date:  </p>
  
  <pre><code>$result=mysql_query("SELECT * FROM data WHERE data_time RLIKE '^$date_range1'");
  </code></pre>
  
  <p>but I need to select between 2 dates.  I tried this but it doesn't work:</p>
  
  <pre><code>$result=mysql_query("SELECT * FROM data WHERE data_time RLIKE BETWEEN '^$date_range1%' and '^$date_range2%");
  </code></pre>