首页 小组 问答 话题 好文 素材 用户 唠叨 我的社区

[MongoDB]php对MongoDB插入命令

道亮_(:з」∠)_Lv.1管理员
2024-07-05 23:31:28
0
87

插入数据


<?php
// 创建插入命令
$document = ['name' => 'John Doe', 'age' => 25];
$insert = new MongoDBDriverBulkWrite();
$insert->insert($document);

// 执行插入操作
$result = $manager->executeBulkWrite($dbname . '.mycollection', $insert);
?>
道亮_(:з」∠)_
道亮_(:з」∠)_

109 天前

签名 : 不交僧道,便是好人。   87       0
评论
站长交流