kito2
www.masteria.net
I have this query:
It shows the top killer/fragger of the server, but I need to adjust it to show the top killer/fragger of a guild (for example guild id equal 8).
PHP:
SELECT `p`.`name` AS `name`, `p`.`level` AS `level`, `p`.`vocation` AS `vocation`, `p`.`promotion` AS `promotion`, COUNT(`p`.`name`) as `frags`
FROM `killers` k
LEFT JOIN `player_killers` pk ON `k`.`id` = `pk`.`kill_id`
LEFT JOIN `players` p ON `pk`.`player_id` = `p`.`id`
GROUP BY `name`
ORDER BY `frags` DESC, `name` ASC
LIMIT 0,1;
It shows the top killer/fragger of the server, but I need to adjust it to show the top killer/fragger of a guild (for example guild id equal 8).