From 0a231c14bb17440fa645287ed2a7a1347be8ee4d Mon Sep 17 00:00:00 2001 From: Russ Long Date: Sun, 1 May 2022 09:37:11 -0400 Subject: [PATCH] Fix pc table join --- app/Console/Commands/TabulateWinners.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Console/Commands/TabulateWinners.php b/app/Console/Commands/TabulateWinners.php index a197c2c..20b3879 100644 --- a/app/Console/Commands/TabulateWinners.php +++ b/app/Console/Commands/TabulateWinners.php @@ -62,7 +62,7 @@ class TabulateWinners extends Command function pcWinner() { - $peoplesChoiceWinnerQuery = DB::table('peoples_choice') + $peoplesChoiceWinnerQuery = PeoplesChoice::join('vehicles', 'peoples_choice.vehicle', '=', 'vehicles.id') ->groupBy('peoples_choice.vehicle') ->selectRaw('*, sum(pc_count) as totalscore') ->whereNotIn('vehicle', function($query){