Good afternoon, my name is Diego Castaño, I am new to this community and I need a favor from some of you.
In a view (vConfExit.jade) I have two select and I need to fill them with two different tables that I have in a database, I have managed to fill one of them with the following code, but to fill the second select I do not know how to create the query within that same code.
getConfSalida: function(req,res,next){
var config=require('.././database/config');
var db=mysql.createConnection(config);
db.connect();
var sql=("SELECT * FROM tbl_conductor");
var result=null;
db.query(sql, function(err,rows,fields){
result=rows;
db.end();
res.render('products/vConfSalida',{result: result});
});
},
Can someone please tell me how to do it?
thank you very much
Diego Castaño