Here is the function see below console.log
function quo (value){
value = connection.query(
\'SELECT role from `roles` where `id` = 1\' ,
fu
function quo (success){
value = connection.query(
'SELECT role from `roles` where `id` = 1' ,
function (error, results, fields) {
if (error) throw error;
console.log('The role is: ', results[0].role);
success (results[0].role);
});
}
quo (function (role) {
console.log(role);
/* do something useful with the role that came back from the query */
});