Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SyntaxError: Unexpected token ILLEGAL. Please help me insert syntax

Here is my command

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

MongoDB told my the syntax has an error.
What did I do wrong?

like image 532
Hikaru Shindo Avatar asked Nov 23 '14 10:11

Hikaru Shindo


1 Answers

You're using curly quotes. Only plain quotes work:

db.tasks.insert({id : "0", title : "task01", description : "description", status : "1", assignorId : "7", assigneeId : "8", createdDate : "", startedDate : "", targetDate : "", completeDate : "", closedDate : ""})
like image 188
Scimonster Avatar answered Nov 10 '22 14:11

Scimonster