MongoDB 在 PHP - 如何将元素插入集合中的数组?
它应该很容易,但我似乎不明白......假设我有一个集合
, 这是集合中的第一个主题:
像驾驶员一样 PHP 为了 MongoDB 然后我会去添加另一个 "task" 掩码 "tasks" 在此元素集合中
users
, 这是集合中的第一个主题:
{
"_id" : ObjectId/"4d8653c027d02a6437bc89ca"/,
"name" : "Oscar Godson",
"email" : "oscargodson@xxx.com",
"password" : "xxxxxx",
"tasks" : [
{
"task" : "pick up stuff",
"comment" : "the one stuff over there"
},
{
"task" : "do more stuff",
"comment" : "lots and lots of stuff"
}
] }
像驾驶员一样 PHP 为了 MongoDB 然后我会去添加另一个 "task" 掩码 "tasks" 在此元素集合中
没有找到相关结果
已邀请:
1 个回复
石油百科
赞同来自:
: