From 2b9eb16b8791596f7a29802dff5eb14baf5845c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Carlos=20Cuevas?= Date: Sat, 1 Jun 2013 23:31:29 +0200 Subject: [PATCH] Started editing and adding real content. --- server.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server.js b/server.js index 364f5a8..438dea9 100644 --- a/server.js +++ b/server.js @@ -56,6 +56,7 @@ app.get('/', function (req, res) { var stats_number = 0; var players = new Array(); + console.log('Serializing'); database.serialize(function() { database.get("SELECT COUNT(*) FROM players", function (err, row) { player_number = row; @@ -63,10 +64,12 @@ app.get('/', function (req, res) { database.get("SELECT COUNT(*) FROM stats", function (err, row) { stats_number = row; }); + console.log('Querying players'); database.each("SELECT * FROM players", function(err, row) { - players.push(row["name"]); + players.push(row.name); }); + console.log('Query finished'); }); res.render('index',