We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

how can I update all 'age' field increase by 2

In Mongo, I want to update all 'age' field to increase by 2. How to operate?

in the sql update user set age=age+2



3.5k
Accepted
answer

It's not question about Phalcon but read https://docs.mongodb.com/manual/reference/operator/update/inc/ - it's solve you problem