Message from JavaScript discussions

June 2019

— Thank you.


Hanz Haneefa:
Guys please help,
I need to find a list of users from user collection that matches a string keyword to "name" in each document. Also need to find the relation between each users to a specific user(logged in user)(relation between 2 users is saved in another collection with a friends_status: true). But the challenging part is need to add pagination and sort friends first.. aggrigation is the only method to do this, bt not getting proper query to do this..

— Wew

— 😳😳

— Hi guys, i need help to render my variable to ejs, i end up getting "fail is not defined"


app.get('/profile', function (req, res, next) {
req.getConnection(function (err, conn) {
conn.query("SELECT count(*) as total from transaction ",
function (err, fail ) {
if(err) throw err;
res.render('/profile', {

Message permanent page

— Where i am trying to render fail

— <span class="h2 font-weight-bold mb-0"><%= fail%></span>

— What could i be doing wrong?😢

— Does '/profile' exist?

— Shouldn't it be just 'profile'

— Yes it does