【发布时间】:2011-07-19 06:15:25
【问题描述】:
这一定很简单,但我似乎无法弄清楚...假设我有一个集合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"
}
] }
然后我将如何使用 MongoDB 的 PHP 驱动程序将另一个“任务”添加到集合中此项的“任务”数组中
【问题讨论】:
标签: php json mongodb database nosql