title: Selecting multiple columns and send to jade
body: <p>I'm building an web application using Node.js, and I'm getting data from my Mysql database using the following function:</p>
  
  <pre><code>function getRobots(robotname, ownerid, callback) {
      connection.query('SELECT * FROM robots WHERE robot_owner_id = ?', ownerid, function(err, rows, fields) {
          if (err) callback(err, null);
          else 
          callback(null, rows);
      });
  }
  </code></pre>
  
  <p>And when the user Logs in I call the function (var x is the user id):</p>
  
  <pre><code>        getRobots("robot", x, function(err, data) {
              if (err) {
  
              console.log("ERROR : ", err);
              } else {
              console.log(data);
              res.render('logged_in', {
              data: data
              });
              }
          });
  </code></pre>
  
  <p>The callback returns me this:</p>
  
  <pre><code>[ RowDataPacket {
      robot_id: 1,
      robot_name: 'one',
      robot_status: 1,
      robot_owner_id: 35 },
    RowDataPacket {
      robot_id: 2,
      robot_name: 'ASAS',
      robot_status: 1,
      robot_owner_id: 35 } ]
  </code></pre>
  
  <p>And my question is, how can I separate and retrieve all the columns data, and send to my jade layout?</p>
  
  <p>I would like to do something like this:</p>
  
  <pre><code>&lt;ul&gt;
  &lt;li&gt;Robot 1 | Id 1&lt;/li&gt;
  &lt;li&gt;Robot 2 | Id 2&lt;/li&gt;
  ...
  </code></pre>
  
  <p>Thank you.</p>