projects
/
e-DoKo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix error when language is not set
[e-DoKo.git]
/
include
/
stats.php
diff --git
a/include/stats.php
b/include/stats.php
index bb6d69319960caad2e601c1b5bb83f990c496d41..23c8721c3c936e665a3bcb8fba0b6ed45dc6ca09 100644
(file)
--- a/
include/stats.php
+++ b/
include/stats.php
@@
-1,5
+1,5
@@
<?php
<?php
-/* Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012 Arun Persaud <arun@nubati.net>
+/* Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012
, 2013, 2014, 2016
Arun Persaud <arun@nubati.net>
*
* This file is part of e-DoKo.
*
*
* This file is part of e-DoKo.
*
@@
-35,7
+35,7
@@
if(!$myid)
return;
$PREF = DB_get_PREF($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']);
$_SESSION['language'] = $PREF['language'];
set_language($PREF['language']);
@@
-199,13
+199,14
@@
if( !$content = getCache("cache/stats.html",60*60*24) )
/*
does the party win more often if they start
/*
does the party win more often if they start
+ global $DB;
echo "<p>The party playing first wins in";
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'");
" 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";
*/
echo $r[1]." (".$r[0].") <br />\n";
echo " games</p>\n";
*/