Started editing and adding real content.

This commit is contained in:
José Carlos Cuevas 2013-06-01 23:59:33 +02:00
parent 82255af112
commit 200580a7da

View file

@ -58,14 +58,7 @@ app.get('/', function (req, res) {
console.log('Serializing');
database.serialize(function() {
database.get("SELECT COUNT(*) FROM players", function (err, row) {
player_number = row;
});
database.get("SELECT COUNT(*) FROM stats", function (err, row) {
stats_number = row;
});
console.log('Querying players');
database.each("SELECT * FROM players", function(err, row) {
console.log('Received a player row! Weheeeee!');
var nextElement = players.length;
@ -73,6 +66,13 @@ app.get('/', function (req, res) {
console.log(players);
});
database.get("SELECT COUNT(*) FROM players", function (err, row) {
player_number = row;
});
database.get("SELECT COUNT(*) FROM stats", function (err, row) {
stats_number = row;
});
res.render('index',
{
title: 'My Game',