query("
(SELECT
code,
hlstats_Actions.description,
COUNT(hlstats_Events_PlayerActions.id) AS obj_count,
SUM(hlstats_Events_PlayerActions.bonus) AS obj_bonus
FROM
hlstats_Actions
LEFT JOIN
hlstats_Events_PlayerActions
ON
hlstats_Events_PlayerActions.actionId = hlstats_Actions.id
LEFT JOIN
hlstats_Players
ON
hlstats_Players.playerId=hlstats_Events_PlayerActions.playerId
WHERE
clan=$clan
GROUP BY
hlstats_Actions.id)
UNION ALL
(SELECT
code,
hlstats_Actions.description,
COUNT(hlstats_Events_PlayerPlayerActions.id) AS obj_count,
SUM(hlstats_Events_PlayerPlayerActions.bonus) AS obj_bonus
FROM
hlstats_Actions
LEFT JOIN
hlstats_Events_PlayerPlayerActions
ON
hlstats_Events_PlayerPlayerActions.actionId = hlstats_Actions.id
LEFT JOIN
hlstats_Players
ON
hlstats_Players.playerId=hlstats_Events_PlayerPlayerActions.playerId
WHERE
clan=$clan
GROUP BY
hlstats_Actions.id)
ORDER BY
$tblPlayerActions->sort $tblPlayerActions->sortorder,
$tblPlayerActions->sort2 $tblPlayerActions->sortorder
");
$numitems = $db->num_rows($result);
if ($numitems > 0)
{
printSectionTitle('Player Actions *');
$tblPlayerActions->draw($result, $numitems, 95);
?>
query("
SELECT
code,
hlstats_Actions.description,
COUNT(hlstats_Events_PlayerPlayerActions.id) AS obj_count,
SUM(hlstats_Events_PlayerPlayerActions.bonus) * -1 AS obj_bonus
FROM
hlstats_Actions
LEFT JOIN hlstats_Events_PlayerPlayerActions ON
hlstats_Events_PlayerPlayerActions.actionId = hlstats_Actions.id
LEFT JOIN hlstats_Players ON
hlstats_Players.playerId=hlstats_Events_PlayerPlayerActions.victimId
WHERE
clan=$clan
GROUP BY
hlstats_Actions.id
ORDER BY
$tblPlayerPlayerActionsV->sort $tblPlayerPlayerActionsV->sortorder,
$tblPlayerPlayerActionsV->sort2 $tblPlayerPlayerActionsV->sortorder
");
$numitems = $db->num_rows($result);
if ($numitems > 0)
{
printSectionTitle('Victims of Player-Player Actions *');
$tblPlayerPlayerActionsV->draw($result, $numitems, 95);
?>