BUGFIX: check for 2nd 10 of hearts in wedding and poverty games
[e-DoKo.git] / include / stats.php
index a643047c0fe1cc545256d33a423e916beacbd2d5..28226fae594f48b426e1142b302aed33482e17b3 100644 (file)
@@ -1,5 +1,5 @@
 <?php
-/* Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012 Arun Persaud <arun@nubati.net>
+/* Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Arun Persaud <arun@nubati.net>
  *
  *   This file is part of e-DoKo.
  *
@@ -199,13 +199,14 @@ if( !$content = getCache("cache/stats.html",60*60*24) )
   /*
  does the party win more often if they start
 
+ global $DB;
  echo "<p>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].") <br />\n";
  echo " games</p>\n";
   */