title: How to select documents with one field greater than other in MongoDB?
body: <p>I have mongodb documents like this</p>
  
  <pre><code>[_id] =&gt; MongoId Object (
      [$id] =&gt; 52135a6baabacb9f948b4567
  )
  [change] =&gt; 7
  [from] =&gt; 8
  [to] =&gt; 1
  </code></pre>
  
  <p>How to select documents with field "from" greater than "to" in MongoDB? I tried something like this but it doesn't work at all.</p>
  
  <pre><code>$collection-&gt;find( array('from' =&gt; array('$gt' =&gt; 'to') ) );
  </code></pre>