query("SELECT name FROM hlstats_Games WHERE code='$game'"); if ($db->num_rows() < 1) error("No such game '$game'."); list($gamename) = $db->fetch_row(); $db->free_result(); pageHeader( array($gamename, "Action Statistics"), array($gamename=>"%s?game=$game", "Action Statistics"=>"") ); $tblPlayerActions = new Table( array( new TableColumn( "description", "Action", "width=45&link=" . urlencode("mode=actioninfo&action=%k&game=$game") ), new TableColumn( "obj_count", "Achieved", "width=25&align=right&append=+times" ), new TableColumn( "obj_bonus", "Skill Bonus", "width=25&align=right" ) ), "code", "obj_count", "description", true, 9999, "obj_page", "obj_sort", "obj_sortorder" ); $db->query(" SELECT COUNT(*) FROM hlstats_Actions, hlstats_Events_PlayerActions WHERE hlstats_Events_PlayerActions.actionId = hlstats_Actions.id AND hlstats_Actions.game='$game' "); list($totalactions) = $db->fetch_row(); $result = $db->query(" SELECT hlstats_Actions.code, hlstats_Actions.description, COUNT(hlstats_Events_PlayerActions.id) AS obj_count, hlstats_Actions.reward_player AS obj_bonus FROM hlstats_Actions, hlstats_Events_PlayerActions, hlstats_Players WHERE hlstats_Events_PlayerActions.playerId = hlstats_Players.playerId AND hlstats_Players.game='$game' AND hlstats_Events_PlayerActions.actionId = hlstats_Actions.id AND hlstats_Actions.game='$game' GROUP BY hlstats_Actions.id ORDER BY $tblPlayerActions->sort $tblPlayerActions->sortorder, $tblPlayerActions->sort2 $tblPlayerActions->sortorder "); ?>
From a total of actions (Last Days) Back to ">

draw($result, $db->num_rows($result), 90); ?>