SyntaxError:意外的标记ILLEGAL。请帮我插入语法

时间:2014-11-23 10:07:49

标签: mongodb mongodb-query

这是我的命令

db.tasks.insert({id : “0”, title : "task01”, description : "description", status : "1", assignorId : "7", assigneeId : “8", createdDate : “", startedDate : “", targetDate : “", completeDate : “", closedDate : “"})

MongoDB告诉我语法有错误 我做错了什么?

1 个答案:

答案 0 :(得分:35)

你正在使用卷曲引号。只有简单的引号有效:

db.tasks.insert({id : "0", title : "task01", description : "description", status : "1", assignorId : "7", assigneeId : "8", createdDate : "", startedDate : "", targetDate : "", completeDate : "", closedDate : ""})