Php 删除集合mongodb上的一行

Php 删除集合mongodb上的一行,php,mongodb,Php,Mongodb,我有这个收藏 { "_id" : ObjectId("554a4aee0faaf2a804b7acd9"), "text" : "bla;", "comment_name" : "test1", "comment_email" : "test@hotmail.fr", "article" : { "_id" : NumberLong(4) } } { "_id" : ObjectId("554a4ba90faaf2a604b7acd9"), "text" : "hey", "comment_na

我有这个收藏

{ "_id" : ObjectId("554a4aee0faaf2a804b7acd9"), "text" : "bla;", "comment_name" : "test1", "comment_email" : "test@hotmail.fr", "article" : { "_id" : NumberLong(4) } }
{ "_id" : ObjectId("554a4ba90faaf2a604b7acd9"), "text" : "hey", "comment_name" : "test2", "comment_email" : "tes2t@hotmail.fr", "article" : { "_id" : NumberLong(4) } }
我想删除我做的一行:

> db.comments_4.( { "comment_name" : "test2" })
我有这个错误

2015-05-06T20:17:24.198+0200 E查询语法错误:意外令牌 (


在访问comments\u 4集合后,您缺少函数名“remove”

db.comments_4.remove({"comment_name" : "test2" })

希望有帮助!

尝试
db.comments\u 4.删除({“comment\u name”:“test2”})