From ea29b9b6341a9036b60190d80db975849e44b278 Mon Sep 17 00:00:00 2001 From: Russ Long Date: Sun, 23 Dec 2018 09:45:59 -0500 Subject: [PATCH] convert helpers --- app/helpers.php | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/app/helpers.php b/app/helpers.php index 635c91e..92b21e6 100644 --- a/app/helpers.php +++ b/app/helpers.php @@ -85,14 +85,12 @@ class WinningBidderSelectList { public static function WinningBidderShowNumbers() { - $winning_bidder_num_results = DB::select("SELECT - winning_bidder_num, bidders.* - FROM winning_bids - INNER JOIN bidders AS bidders - ON winning_bids.winning_bidder_num=bidders.idbidders - GROUP BY winning_bidder_num - ORDER BY winning_bidder_num - "); + + $winning_bidder_num_results = WinningBids::join('bidders', 'winning_bids.winning_bidder_num', '=', 'bidders.idbidders') + ->groupBy('winning_bider_num') + ->orderBy('bidders.bidder_assigned_number') + ->get(); + $winning_bidder_num = ''; foreach($winning_bidder_num_results as $winning_bidder_num_result){ $winning_bidder_num .= '';