Jamund's Coding Blog

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}});

Posted by Jamund Ferguson at Monday, April 11, 2011

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)
My wife and I visiting the beautiful Cinque Terre in Italy last August.

Blog Archive

  • ►  2015 (1)
    • ►  June (1)
  • ►  2014 (1)
    • ►  March (1)
  • ►  2013 (2)
    • ►  August (1)
    • ►  January (1)
  • ►  2012 (16)
    • ►  August (1)
    • ►  May (1)
    • ►  April (1)
    • ►  March (5)
    • ►  February (2)
    • ►  January (6)
  • ▼  2011 (33)
    • ►  November (4)
    • ►  October (1)
    • ►  September (1)
    • ►  August (2)
    • ►  July (1)
    • ►  June (3)
    • ►  May (2)
    • ▼  April (5)
      • Express Pagination Middleware Simplicity
      • JS Codings Standards
      • MongoHQ and Node
      • Locals in ExpressJS
      • Incrementing a Count Variable With Mongo
    • ►  March (2)
    • ►  February (5)
    • ►  January (7)
  • ►  2010 (72)
    • ►  December (1)
    • ►  November (4)
    • ►  October (1)
    • ►  August (4)
    • ►  July (6)
    • ►  June (5)
    • ►  May (22)
    • ►  April (13)
    • ►  March (16)
  • ►  2009 (3)
    • ►  December (1)
    • ►  March (2)
Awesome Inc. theme. Powered by Blogger.