This commit is contained in:
Russ Long 2020-02-08 15:24:15 -05:00
parent 0d10e2047b
commit 825a192581

View File

@ -57,23 +57,8 @@ class TabulateWinners extends Command
->orderBy('totalscore','desc') ->orderBy('totalscore','desc')
->first(); ->first();
return $mainWinnerQuery->vehicle; return $mainWinnerQuery->vehicle;
} }
/* function categoryWinner($category)
{
$categoryWinnerQuery = VehicleScores::join('vehicles', 'vehicle_scores.vehicle', '=', 'vehicles.id')
->groupBy('vehicles.id')
->selectRaw('*, sum(vehicle_scores.overall_score) as totalscore')
->whereNotIn('vehicle_scores.vehicle', function ($query) {
$query->select('vehicle')->from('car_show_winners');
})
//->where('vehicles.doNotJudge', '=', 0)
//->where('vehicles.type', '=', "$category")
->orderBy('totalscore', 'desc')
->first();
return $categoryWinnerQuery->vehicle;
}
*/
function pcWinner() function pcWinner()
{ {
$peoplesChoiceWinnerQuery = DB::table('peoples_choice') $peoplesChoiceWinnerQuery = DB::table('peoples_choice')
@ -190,7 +175,20 @@ class TabulateWinners extends Command
->first(); ->first();
return $thousandsQuery->vehicle; return $thousandsQuery->vehicle;
} }
function categoryWinner($category)
{
$categoryWinnerQuery = VehicleScores::join('vehicles', 'vehicle_scores.vehicle', '=', 'vehicles.id')
->groupBy('vehicles.id')
->selectRaw('*, sum(vehicle_scores.overall_score) as totalscore')
->whereNotIn('vehicle_scores.vehicle', function ($query) {
$query->select('vehicle')->from('car_show_winners');
})
//->where('vehicles.doNotJudge', '=', 0)
//->where('vehicles.type', '=', "$category")
->orderBy('totalscore', 'desc')
->first();
return $categoryWinnerQuery->vehicle;
}
//categories //categories
/* Here for reference only /* Here for reference only
$individuallyProcessedAwards = array( $individuallyProcessedAwards = array(