I have this code:
var query = 'SELECT postName FROM post WHERE id = ' + id;
db.get(query, function dato(err, row) {
if (err){
console.log(err);
}else{
console.log(row.postName); // works!
return row.postName;
}
});
Can you help me to know the way for store row.postName into a global variable?
via estebancito
No comments:
Post a Comment