router.get('/',function (req,res,next) {
var oracledb = require('oracledb');
oracledb.getConnection(
{
user: 'username',password: 'password'
}, (err,connection) {
if (err) {
console.error(err.message);
return;
}
connection.execute(
"SELECT * from CMS_FIlE where content_id=:id"// bind value for :id
(err) {
console.error(err.message);
;
}
res.render('index',{title: '查询信息:' + JSON.stringify(result.rows)});
});
});
});