-1

我怎么能数一个 int 呢?

这个计数不起作用

$db->system->update( array('test' => "one"),
  array('$inc' => array("uniqCounter" => +1 ))
);
4

1 回答 1

0

That should work.

Note that it will only do the increment on the first matching document, you have to specifiy an additional argument if you want to change all document where test is one.

于 2013-07-08T12:14:12.847 回答