Closed lsndr closed 7 years ago
I tried to run this code
//ctx.message.text = 'dog'; //ctx.meta.user.id = 1; db.run('DELETE FROM `vocabulary` WHERE `word` = ? AND `user_id` = ?', [ctx.message.text, ctx.meta.user.id], function (result) { console.log(result); });
But I get next error in console: {error: [Error: no such column: dog]}
Use quotes: '?'
But it still doesn't solve the problem. If "ctx.message.text" will be contaiing symbol ' db.run throws sql syntax error.
I tried to run this code
But I get next error in console: {error: [Error: no such column: dog]}