Skip to content

Instantly share code, notes, and snippets.

@IchrakMansour
Last active July 16, 2018 20:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IchrakMansour/4e1dcea4caf5670740f3370efcecedd0 to your computer and use it in GitHub Desktop.
Save IchrakMansour/4e1dcea4caf5670740f3370efcecedd0 to your computer and use it in GitHub Desktop.
exports.viewclient = function(req, res) {
//var Code = req.params.Code;
console.log(req.params);
connection.query('SELECT Code, Prenom, Nom, FAX, Telephone, Email, Adresse1, Adresse2 FROM clients WHERE Code = ?',[req.params.Code], function(error, results, fields) {
if (error) throw error;
res.send(JSON.stringify(results));
console.log(results);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment