Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* GET Book Details page. */
- router.get('/details/:id', function(req, res, next) {
- var sql = `SELECT * FROM books WHERE id = ${req.params.id}`;
- var query = db.query(sql, function (err, result) {
- if(err) throw err;
- console.log(result);
- var model = {result: result}
- res.render('shop/details', { title: 'Books', model });
- });
- });
- <h1 class="text-center">Book Details Here</h1>
- <h3> Your Book Name is {{this.BookName}}</h3>
Add Comment
Please, Sign In to add comment