Monday, April 11, 2011

Incrementing a Count Variable With Mongo

The main line that you need to look for is the following one:
db.logs.update({}, {$inc:{count:1}});

No comments:

Post a Comment