-
-/* number of solos */
-echo "<p>These kind of games have been played this often: <br />";
-$result = mysql_query("SELECT COUNT(*) as c,type from Game".
- " WHERE status='gameover'".
- " GROUP BY type".
- " ORDER BY c DESC");
-while( $r = mysql_fetch_array($result,MYSQL_NUM))
- echo "".$r[1]." (".$r[0].") <br />";
-echo " </p>\n";
-
-/* break up solos in types */
-echo "<p>These kind of solos have been played this often: <br />";
-$result = mysql_query("SELECT COUNT(*) as c,solo from Game".
- " WHERE status='gameover'".
- " AND type='solo'".
- " GROUP BY solo".
- " ORDER BY c DESC");
-while( $r = mysql_fetch_array($result,MYSQL_NUM))
- echo "".$r[1]." (".$r[0].")<br />";
-echo "</p>\n";
-
-/*
- 2 top user mit maximaler quote an solo (min 10 games)
-
- top scoring game: winning players
-
- game with the same cards: show 3 at random:
- player who won, points, what kind of game
- 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));
-
-*/
-echo "<p>Most extra points (doko, fox, karlchen) in a single game:<br />\n";
-$result = mysql_query("SELECT COUNT(*) as c,fullname 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" );
-while( $r = mysql_fetch_array($result,MYSQL_NUM))
- echo $r[1]." (".$r[0].") <br />\n";
-echo "</p>\n";
-