Hey there guys trying to convert this query from 0.4 to 1.5; looked around and couldnt find the solution.
Trying to get the players frag count to display on characters.php for gesior.
This is an example of what the sql query looks like to pull the players death count.
There is a column "is_player" and also "unjustified" in the player_deaths table so I've tried a few variations of that but to no success.
Any help is appreciated.
Trying to get the players frag count to display on characters.php for gesior.
Code:
$frags = $SQL->query("SELECT COUNT(`p`.`name`) AS count FROM `killers` k LEFT JOIN `player_killers` pk ON `k`.`id` = `pk`.`kill_id` LEFT JOIN `players` p ON `pk`.`player_id` = `p`.`id` WHERE `p`.`id` = '".$player->getId()."';")->fetch();
This is an example of what the sql query looks like to pull the players death count.
Code:
$deaths = $SQL->query("SELECT COUNT(`pd`.`player_id`) AS count FROM `player_deaths` pd WHERE `pd`.`player_id` = '".$player->getId()."';")->fetch();
There is a column "is_player" and also "unjustified" in the player_deaths table so I've tried a few variations of that but to no success.
Any help is appreciated.
Last edited: