Closed TongDaDa closed 5 years ago
Without code showing how this can be reproduced, this can't be fixed.
@dxg sorry, I forgot it...
req.models.new_word_manage.where(`SELECT * FROM new_word_manage WHERE create_time BETWEEN "2018-07-15" AND "2018-07-16"`, (err, word) => {
if (err) throw err;
console.log(word);
res.send("asdasd")
});
I don't think you can pass SQL with a SELECT directly to a .where
like that. I also recommend using the provided finders: https://github.com/dresende/node-orm2#conditions to build the query for you - it'll avoid any sql injection problems.
Use my SQL tool to query it as follows
But use "orm" an unknown error has occurred