convert winningbidderlist

This commit is contained in:
Russ Long 2018-12-24 13:27:49 -05:00
parent 4b22f36fac
commit 07b056f680
2 changed files with 5 additions and 7 deletions

View File

@ -336,12 +336,10 @@ class PagesController extends Controller
public function winningbidderlist()
{
$winnerlist_results = DB::select("SELECT
winning_bidder_num
FROM winning_bids
GROUP BY winning_bidder_num
ORDER BY winning_bidder_num
");
$winnerlist_results = WinningBids::join('bidders', 'winning_bids.winning_bidder_num', '=', 'bidders.idbidders')
->groupBy('winning_bidder_num')
->orderBy('bidders.bidder_assigned_number')
->get();
return view('winningbidderlist', ['winnerlist_results' => $winnerlist_results]);
}
}

View File

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