X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=e-DoKo.git;a=blobdiff_plain;f=include%2Fstats.php;h=28226fae594f48b426e1142b302aed33482e17b3;hp=f0d436b089b639196f583e223fb6fe7f9cc03660;hb=742ba18eaf36386d2d0e0936975b3f2545afc59e;hpb=1e258af4136567ab30ce9b54aee751077f80590e;ds=sidebyside diff --git a/include/stats.php b/include/stats.php index f0d436b..28226fa 100644 --- a/include/stats.php +++ b/include/stats.php @@ -1,5 +1,5 @@ +/* Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Arun Persaud * * This file is part of e-DoKo. * @@ -35,8 +35,9 @@ if(!$myid) return; $PREF = DB_get_PREF($myid); -/* set language chosen in preferences, will become active on the next reload (see index.php)*/ +/* set language chosen in preferences*/ $_SESSION['language'] = $PREF['language']; +set_language($PREF['language']); DB_update_user_timestamp($myid); @@ -198,13 +199,14 @@ if( !$content = getCache("cache/stats.html",60*60*24) ) /* does the party win more often if they start + global $DB; echo "

The party playing first wins in"; - $result = mysql_query("SELECT COUNT(*) from Score". + $result = $DB->query("SELECT COUNT(*) from Score". " LEFT JOIN Game ON Game.id=game_id". " WHERE score='againstqueens'". " AND Game.status='gameover'". " AND Game.type<>'solo'"); - while( $r = mysql_fetch_array($result,MYSQL_NUM)) + while( $r = $result->fetch_array(MYSQLI_NUM)) echo $r[1]." (".$r[0].")
\n"; echo " games

\n"; */