Display count value in the mysql database table using handlebars in Nodejs project
问题 I have a webpage that displays number of applications in certain grades. For example, number of applications in grade 6, grade 7 and grade 8. The functions that I use for grade 6 and grade 7 are as below: function getGrade6Applicants(req, res, next) { connection.query('SELECT COUNT(*) AS grade_6 FROM applications WHERE grade="Grade 6" ', function (err, rows, fields) { if (err) { return next(err); }; req._applications = rows; return next(); });} function getGrade7Applicants(req, res, next) {