title: Propel 1.6 Greater / Less than
body: <p>Im trying to do something pretty simple in Propel ORM which I just cant seem to work out or find the answer to.</p>
  
  <p>Basically I have a table called post and a table called post_history.  Every time someone makes an edit to a post, the previous version is saved to post_history first.  </p>
  
  <p>I have an 'undo' button against each post where I simply want to select the last 'post_history' record for the post and revert the post data from the history.  To select the last history that is older than my post how do I select GREATER or LESS than in propel?</p>
  
  <p>If I do something like this:</p>
  
  <pre><code>$postHistory = PostHistoryQuery::create()
                  -&gt;filterByPostId($post-&gt;getId())
                  -&gt;filterByCreated(array("max" =&gt; $post-&gt;getUpdated()))
                  -&gt;orderById("DESC")
                  -&gt;limit(1);
  </code></pre>
  
  <p>the filterByCreated with the 'max' specified does indeed select the last 'post_history' but if you click undo again it selects the same record because the max seems to specify less or equal to rather just less than.  It may require a custom query? I think im missing a trick that I cant find the answer too.  My search for the answer hasn't helped so far.</p>
  
  <p>Any help is much appreciated.</p>