title: 'Cannot read property 'length' of undefined' nodeJS
body: <p>I'm getting started in Node.js and I'm completely confused as to why I can't get the results of my SQL query to render on a page, i'm using sqlite3.
  This is a part of my index.js file</p>
  
  <pre><code>router.get('/students', function (req, res, module) {
  
  var fs = require("fs");
  var file = "./test.db";
  var exists = fs.existsSync(file);
  if (!exists) {
      console.log("Creating DB file.");
      fs.openSync(file, "w");
  }
  
  var sqlite3 = require("sqlite3").verbose();
  var db = new sqlite3.Database(file);
  
  db.serialize(function () {
      if (!exists) {
          db.run("Create table students ( ID INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL UNIQUE, Nom varchar (255), Prenom varchar (255) );");
      }
  });
      db.all('SELECT * FROM students', function selectCb(err, rows, fields) {
          if (err) {
              throw err;
          }
          for (var i in rows) {
              console.log(rows[i]);
          }
          res.render('showResults.jade', {
              results: rows
          });
  });
  db.close();
  res.render('students', { title: 'list' });
  });
  </code></pre>
  
  <p>This is my Jade (create.jade) file;</p>
  
  <pre><code>    block content
  form(method='get', action='/students/create')
      button(type='submit') Creer
  ul
      each item, i in results
          li #{item.Nom} (#{item.Prenom})
          li= JSON.stringify(item)
  </code></pre>
  
  <p>I put all of this things in my express app, I launch it with my shell, I receive all the sql data like this:</p>
  
  <pre><code>{ ID: 1, Nom: 'zeze', Prenom: 'zeze' }
  { ID: 2, Nom: 'ertty', Prenom: 'uuuuuuuuuuu' }
  </code></pre>
  
  <p>But my /students page show a message </p>
  
  <p><a href="http://i.stack.imgur.com/ormUG.png" rel="nofollow">http://i.stack.imgur.com/ormUG.png</a></p>
  
  <p>Could you please help me, I'm really desperate.
  (Sorry for my bad english I'm French) ^^</p>