mardi 10 octobre 2017

Node.js and mysql return statement

It's the first time for me im writing a question, in case of having no answer to my problem.

What should I do to solve the problem below.

function getInfoFromName(value) {

getConnection().query("SELECT messages FROM Messages WHERE ident = ?;", value, function (err, result, fields) {

    return result[0].messages;
});

}

Is there any reason why this is not working ? I need your help to solve it.

Thank you!

Aucun commentaire:

Enregistrer un commentaire