Started editing and adding real content.

This commit is contained in:
José Carlos Cuevas 2013-06-01 23:31:29 +02:00
parent b2d0024fda
commit 2b9eb16b87

View file

@ -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',