diff --git a/system/pages/highscores.php b/system/pages/highscores.php index 0e5662e17..a1e2567fc 100644 --- a/system/pages/highscores.php +++ b/system/pages/highscores.php @@ -180,7 +180,7 @@ } else if ($skill == SKILL_FRAGS) // frags { if ($db->hasTable('player_killers')) { - $query->addSelect(['value' => PlayerKillers::where('player_killers.player_id', 'players.id')->selectRaw('COUNT(*)')]); + $query->addSelect(['value' => PlayerKillers::whereColumn('player_killers.player_id', 'players.id')->selectRaw('COUNT(*)')]); } else { $query->addSelect(['value' => PlayerDeath::unjustified()->whereColumn('player_deaths.killed_by', 'players.name')->selectRaw('COUNT(*)')]); } diff --git a/system/src/Models/PlayerKillers.php b/system/src/Models/PlayerKillers.php index 55abbfd8b..d0bd9fdcb 100644 --- a/system/src/Models/PlayerKillers.php +++ b/system/src/Models/PlayerKillers.php @@ -5,7 +5,7 @@ class PlayerKillers extends Model { - protected $table = 'players_killers'; + protected $table = 'player_killers'; public $timestamps = false;