@
@
@Twitt2019-10-17 10:57:55
PHP
@Twitt, 2019-10-17 10:57:55

Is it possible to do a mass update of Mongo data in php?

I look in the dock - https://www.php.net/manual/en/mongocollection.upda...
I can't figure out how to do a bulk update. For example:
I have 100 documents that need to be replaced. For example, for a document with id = 14, put firstName = 'Denis', with id = 15, I need to replace lastName, and for each of the 100 docks, I need to replace some of my own data.
Someone came across whether it is possible to do bulkUpdate, or you need to do foreach (updates one at a time in a cycle, which I certainly don’t want)
For example, I see batchInsert, but somehow I didn’t find anything about the update

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question