Well, I have the following code:
pool.query('SELECT * FROM 'info' WHERE 'id' = 1', function(err, row) {
var jogo = row[0].jogo;
console.log(jogo);
});
The problem is, if I take the var game from the function, it no longer works, however I needed it to exit the function to do some other checks outside the function.
How can I do this?
Thank you.