function getUser(name) {
client.query(`SELECT * FROM users WHERE name=? LIMIT 1`, [name]).then(data =>Β {
// I want it to process and return the user data
})
// But it skips the query and returns undefined
}
function getUser(name) {
client.query(`SELECT * FROM users WHERE name=? LIMIT 1`, [name]).then(data =>Β {
// I want it to process and return the user data
})
// But it skips the query and returns undefined
}