首页 话题 小组 问答 好文 用户 我的社区 域名交易 唠叨

[MongoDB]php对MongoDB插入命令

发布于 2024-07-05 23:31:28
0
195

插入数据


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

// 执行插入操作
$result = $manager->executeBulkWrite($dbname . '.mycollection', $insert);
?>
评论
一个月内的热帖推荐
道亮_(:з」∠)_
Lv.1管理员

404

帖子

30

小组

2177

积分

赞助商广告
站长交流