خرید بک لینک

Vote count: 0

I have following nodejs code:

app.get('/dashboard', function(req, res){

    db.collection('com_url_mamy').find().toArray(function(err, doc){
      db.collection('com_url_mamy').find({'price':''}).count(function(err, docs){
        db.collection('com_url_mamy').find({"price":{$not:{$ne:"last_price_1"}}}).count(function(err, last_doc){

        if(err){console.log(err);}
        console.log(docs);
      res.render('dashboard',{'doc':doc, 'docs':docs, 'last_doc':last_doc});
    });
    });
  });

Here i have to add more two or three query/callback.

But I don't think this is write way to do. Please any one can me tell me how I can solve this problem to increase performance.

Thank You

asked 1 min ago

- - , .

برچسب: نویسنده: استخدام کار تاريخ: شنبه 15 اسفند 1394 ساعت: 18:19

صفحه بندی