title: node.js - Combining mysql results into a single object
body: <p>So basically what I'm trying to do is something like this (not handling errors to make it shorter):</p>
  
  <pre><code>.get('/info', function(req, res){
      var combinedString = "";
  
      connection.query('SELECT col FROM table1 WHERE id = ?', [req.user.id], function(err, rows){
          combinedString += rows; 
      });
  
      connection.query('SELECT col FROM table2 WHERE id = ?', [req.user.id], function(err, rows){
          combinedString += rows; 
      });
  
      res.send(combinedString);
  })
  </code></pre>
  
  <p>Now I understand that this is a problem due to node's async nature. Is there a way around it to get the result I want?</p>