Skip to content

Instantly share code, notes, and snippets.

@DaSilvaJr
Created April 7, 2018 13:44
Show Gist options
  • Save DaSilvaJr/40201833c09d178219d04e114bf78e6a to your computer and use it in GitHub Desktop.
Save DaSilvaJr/40201833c09d178219d04e114bf78e6a to your computer and use it in GitHub Desktop.
exports.list = function(req, res){
req.getConnection(function(err,connection){
var dropdownFisikJln = connection.query ('SELECT * FROM dropdownlist', function(err, rows){
if(err)
console.log("Error Selecting : %s ",err);
res.redirect('kebinamargaan',{
page_title:"Customers - Node.js",data:rows,
title: "Kebinamargaan SI"
});
});
var query = connection.query('SELECT * FROM kebinamargaan',function(err,rows)
{
if(err) return err
res.render('kebinamargaan',{
page_title:"Customers - Node.js",data:rows,
title: "Kebinamargaan SI"
});
});
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment