E
E
EpicUsaMan2017-02-01 18:13:24
MySQL
EpicUsaMan, 2017-02-01 18:13:24

Unexpected identifier Nodejs?

/lot.js:137
var [lottery] = await msql.execute("SELECT lottery.tickets, COUNT(tickets.*) AS `count`, COUNT(DISTINCT tickets.user_id) AS `users` FROM lottery INNER JOIN tickets ON lottery_id = ? WHERE id = ?", [msg.id, msg.id]);
                                                                                                                                                                                     ^^^
SyntaxError: Unexpected identifier

Node 7.4 (--harmony)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Eugene, 2017-02-01
@AppFA

There would be more code, otherwise nothing is clear. Do you have a function in which you use await is asynchronous? those.:

async () => {
...
var [lottery] = await msql.execute("...", [msg.id, msg.id]);
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question