插入数据
<?php // 创建插入命令 $document = ['name' => 'John Doe', 'age' => 25]; $insert = new MongoDBDriverBulkWrite(); $insert->insert($document); // 执行插入操作 $result = $manager->executeBulkWrite($dbname . '.mycollection', $insert); ?>
109 天前