title: SELECT all records that are 30 days old
body: <p>I need to SELECT all records that are 30 days old. I have the code below but it's not working. In updatestatus I have dates like 12/26/2011. I create a 30 day old date like </p>
  
  <pre><code>$onemonthago="01/01/2012";
  $sth = $dbh-&gt;prepare(qq(
          SELECT * 
          FROM people 
          WHERE STR_TO_DATE (updatestatus,'%m/%d/%y') 
                &lt;= STR_TO_DATE ( "$onemonthago",'%m/%d/%Y')
                      )  );
  </code></pre>