diff options
author | Arun Persaud <arun@nubati.net> | 2008-09-14 14:27:26 -0700 |
---|---|---|
committer | Arun Persaud <arun@nubati.net> | 2008-09-14 14:27:26 -0700 |
commit | 797448419b0b0408d6eafe9b9a8b7fdd54bf7fb4 (patch) | |
tree | d300f804be295804584be80ffbb6346a94959b8b /include/stats.php | |
parent | c85a02555f543be61a122001bd430070dc45ba1d (diff) | |
download | e-DoKo-797448419b0b0408d6eafe9b9a8b7fdd54bf7fb4.tar.gz e-DoKo-797448419b0b0408d6eafe9b9a8b7fdd54bf7fb4.tar.bz2 e-DoKo-797448419b0b0408d6eafe9b9a8b7fdd54bf7fb4.zip |
NEW FEATURE: statistics for contra/re calls, no90, etc.
how often does the re/contra party call no 90, no 60, etc.
Signed-off-by: Arun Persaud <arun@nubati.net>
Diffstat (limited to 'include/stats.php')
-rw-r--r-- | include/stats.php | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/include/stats.php b/include/stats.php index d49d57a..d372e4a 100644 --- a/include/stats.php +++ b/include/stats.php @@ -104,15 +104,16 @@ if( !$content = getCache("cache/stats.html",60*60*24) ) select g1.id, g2.id from game g1 left join game g2 on g1.randomnumbers=g2.randomnumbers where g1.id<g2.id order by g1.id select id from game where randomnumbers like "blablabl%"; the % is like .* in regexp select id,type,solo,status from game where id in (select id from game where randomnumbers in (select randomnumbers from game where id=27)); - */ - $result = DB_query_array_all("SELECT fullname,COUNT(*) as c FROM Score". - " LEFT JOIN User ON User.id=winner_id" . - " WHERE score IN ('fox','doko','karlchen')". - " GROUP BY game_id,fullname". - " ORDER BY c DESC LIMIT 3" ); - array_unshift($result,array("Name","Points")); - echo output_table($result,"Most extra points in a single game","stats"); + + /* number of calls*/ + $result = DB_query_array_all("SELECT CONCAT_WS(' ',party,IFNULL(point_call,'no call')),COUNT(*) from Hand". + " LEFT JOIN Game on Game.id=Hand.game_id ". + " WHERE Game.status='gameover'". + " GROUP BY party,point_call"); + array_unshift($result,array("call","Frequency")); + echo output_table($result,"Kind of call","stats"); + /* most reminders */ $result = DB_query_array_all("SELECT fullname, COUNT(*) /" . |