convert helpers

This commit is contained in:
Russ Long 2018-12-23 09:45:59 -05:00
parent 98609a7883
commit ea29b9b634

View File

@ -85,14 +85,12 @@ class WinningBidderSelectList
{ {
public static function WinningBidderShowNumbers() public static function WinningBidderShowNumbers()
{ {
$winning_bidder_num_results = DB::select("SELECT
winning_bidder_num, bidders.* $winning_bidder_num_results = WinningBids::join('bidders', 'winning_bids.winning_bidder_num', '=', 'bidders.idbidders')
FROM winning_bids ->groupBy('winning_bider_num')
INNER JOIN bidders AS bidders ->orderBy('bidders.bidder_assigned_number')
ON winning_bids.winning_bidder_num=bidders.idbidders ->get();
GROUP BY winning_bidder_num
ORDER BY winning_bidder_num
");
$winning_bidder_num = '<option disabled selected hidden value="">choose...</option>'; $winning_bidder_num = '<option disabled selected hidden value="">choose...</option>';
foreach($winning_bidder_num_results as $winning_bidder_num_result){ foreach($winning_bidder_num_results as $winning_bidder_num_result){
$winning_bidder_num .= '<option value="' . $winning_bidder_num_result->idbidders . '">' . $winning_bidder_num_result->bidder_assigned_number . ' - ' . $winning_bidder_num_result->bidder_fname . ' ' . $winning_bidder_num_result->bidder_lname .'</option>'; $winning_bidder_num .= '<option value="' . $winning_bidder_num_result->idbidders . '">' . $winning_bidder_num_result->bidder_assigned_number . ' - ' . $winning_bidder_num_result->bidder_fname . ' ' . $winning_bidder_num_result->bidder_lname .'</option>';