We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 94da547 commit a782c9aCopy full SHA for a782c9a
docs/ods.md
@@ -157,7 +157,9 @@ To save this information, we can insert `$hannes` into the database like so:
157
try {
158
$wc = new MongoDB\Driver\WriteConcern(MongoDB\Driver\WriteConcern::MAJORITY);
159
$manager = new MongoDB\Driver\Manager("mongodb://192.168.112.10:2000");
160
- $result = $manager->executeInsert("congress.people", $hannes, $wc);
+ $bulk = new MongoDB\Driver\BulkWrite;
161
+ $bulk->insert($hannes);
162
+ $result = $manager->executeBulkWrite("congress.people", $bulk, $wc);
163
echo "Hannes has been inserted\n";
164
} catch(Exception $e) {
165
echo $e->getMessage(), "\n";
0 commit comments