Im going to make some new gesior scripts i need just a help.
This is in guild page. It should display points in each guild. How to show the correct output? I had this script for global checking top 3 guilds and I think its sth wrong when it comes to pointing a guild
Thanks and see the release soon.
PHP:
$guild_id = (int)$_GET['guild'];
$point = $SQL->query('
SELECT
`g`.`id` AS `id`,
`g`.`name` AS `name`,
SUM(`p`.`level`) AS `level`,
COUNT(`p`.`name`) AS `count`,
AVG(`p`.`level`) AS `average`,
MIN(`p`.`level`) AS `min`,
MAX(`p`.`level`) AS `max`
FROM `players` p
LEFT JOIN `guild_ranks` gr ON `p`.`rank_id` = `gr`.`id`
LEFT JOIN `guilds` g ON `gr`.`guild_id` = `g`.`id`
WHERE `guild_id` = '.$guild_id.'
')->fetch();
$Points = $point['level'] + $point['count'] + round($point['average']) + $point['min'] + $point['max'];
This is in guild page. It should display points in each guild. How to show the correct output? I had this script for global checking top 3 guilds and I think its sth wrong when it comes to pointing a guild
Thanks and see the release soon.