convert winnerlist

This commit is contained in:
Russ Long 2018-12-24 13:29:48 -05:00
parent 07b056f680
commit 055934376e
2 changed files with 5 additions and 10 deletions

View File

@ -261,15 +261,10 @@ class PagesController extends Controller
public function winnerlist()
{
$winnerlist_results = DB::select("SELECT
*, bidders.bidder_assigned_number, items.item_assigned_num
FROM winning_bids
INNER JOIN bidders as bidders
ON winning_bids.winning_bidder_num=bidders.idbidders
INNER JOIN items as items
ON winning_bids.winning_item_num=items.iditems
ORDER BY winning_item_num ASC
");
$winnerlist_results = WinningBids::join('bidders', 'winning_bids.winning_bidder_num', '=', 'bidders.idbidders')
->groupBy('winning_bidder_num')
->orderBy('bidders.bidder_assigned_number')
->get();
return view('winnerlist', ['winnerlist_results' => $winnerlist_results]);
}

View File

@ -15,7 +15,7 @@
foreach($winnerlist_results as $winnerlist_result){
echo "<td>" . $winnerlist_result->winning_bidder_num . "</td>";
echo "<td>" . $winnerlist_result->bidders->bidder_assigned_number . "</td>";
// do we need a new row?
if($i % 6 === 0){