title: Why this update query only update one record once
body: <pre><code>$coll-&gt;update(
    array(
      "uid"=(int)$uid,
      "status"=&gt;1,
      "time"=&gt;array('$gt'=&gt;0,'$lte'=&gt;$time)
    ),
    array(
      '$set'=&gt;array("status"=&gt;0)
    )
  );
  </code></pre>
  
  <p>If you can't read PHP, CLI version of above code:</p>
  
  <pre><code>db.we.update({"uid":1,"status":1,"time":{"$lte":1324403899}},{"$set":{status:0}})
  </code></pre>
  
  <p>where <code>time</code> is a timestamp integer, and status is int 0 or 1.</p>