Skip to content

Instantly share code, notes, and snippets.

@dmastag
Forked from DaSilvaJr/2 query select in one page
Last active April 7, 2018 14:01
Show Gist options
  • Save dmastag/f87bc2f7d79151878c85a1ee46b9a82f to your computer and use it in GitHub Desktop.
Save dmastag/f87bc2f7d79151878c85a1ee46b9a82f to your computer and use it in GitHub Desktop.
exports.list = function(req, res){
req.getConnection(async (err,connection) => {
var dropdownFisikJln = await connection.query ('SELECT * FROM dropdownlist');
var query = await connection.query ('SELECT * FROM kebinamargaan');
res.redirect('kebinamargaan',{
page_title:"Customers - Node.js",
data: {
dataDropDown: dropdownFisikJln,
dataQuery: query
},
title: "Kebinamargaan SI"
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment