title: How to use MySQL functions in Propel
body: <p>I want to select records that are 1 month old or newer.</p>
  
  <p>The query is: SELECT * FROM foobar WHERE created_at > DATE_SUB(curdate(), INTERVAL 1 MONTH)</p>
  
  <p>Using Propel in Symfony, I do:</p>
  
  <blockquote>
    <p>$c = new Criteria<br>
    $c->add(FoobarPeer::CREATED_AT, "DATE_SUB(curdate(), INTERVAL 1 MONTH)", Criteria::GREATER_THAN);  </p>
  </blockquote>
  
  <p>What Propel generates is: SELECT * FROM foobar WHERE created_at > 'DATE_SUB(curdate(), INTERVAL 1 MONTH)' - in other words, it puts the MySQL function in single quotes, which makes it a (meaningless) string and I get no records.</p>
  
  <p>What I've done for now is:</p>
  
  <blockquote>
    <p>$c->add(FoobarPeer::CREATED_AT, "created_at > DATE_SUB(curdate(), INTERVAL 1 MONTH)", Criteria::CUSTOM);  </p>
  </blockquote>
  
  <p>But I don't want to use custom workarounds unless I have to. Any hints besides using Criteria::CUSTOM?</p>