From 42bd6b6bd308ff8130a0835c976f815a3d204418 Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Thu, 31 Oct 2013 03:46:08 +0000 Subject: [PATCH] updated game stats --- source/masterserver/showGameStats.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/masterserver/showGameStats.php b/source/masterserver/showGameStats.php index d6c4ff31..5cc69922 100644 --- a/source/masterserver/showGameStats.php +++ b/source/masterserver/showGameStats.php @@ -41,9 +41,9 @@ // consider replacing this by a cron job cleanupServerList(); - $whereClause = 'gameUUID=\'' . mysql_real_escape_string( $gameUUID ) . '\';'; + $whereClause = 'gameUUID=\'' . mysql_real_escape_string( $gameUUID ) . '\''; - $stats_in_db = mysql_query( 'SELECT * FROM glestgamestats WHERE ' . $whereClause); + $stats_in_db = mysql_query( 'SELECT * FROM glestgamestats WHERE ' . $whereClause . ';'); $all_stats = array(); while ( $stats = mysql_fetch_array( $stats_in_db ) ) { @@ -52,7 +52,7 @@ unset( $stats_in_db ); unset( $stats ); - $player_stats_in_db = mysql_query( 'SELECT * FROM glestgameplayerstats WHERE ' . $whereClause); + $player_stats_in_db = mysql_query( 'SELECT * FROM glestgameplayerstats WHERE ' . $whereClause . ' ORDER BY factionIndex;'); $all_player_stats = array(); while ( $player_stats = mysql_fetch_array( $player_stats_in_db ) ) { @@ -181,7 +181,7 @@ printf( "\t\t\t\t%s%s", htmlspecialchars( $player_stats['playerName'], ENT_QUOTES ), PHP_EOL ); printf( "\t\t\t\t%s%s", htmlspecialchars( $player_stats['quitBeforeGameEnd'], ENT_QUOTES ), PHP_EOL ); - $quitTime = $stats['quitTime']; + $quitTime = $player_stats['quitTime']; $quitTime = getTimeString($quitTime); printf( "\t\t\t\t%s%s", htmlspecialchars( $quitTime, ENT_QUOTES ), PHP_EOL );