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() public function winningbidderlist()
{ {
$winnerlist_results = DB::select("SELECT $winnerlist_results = WinningBids::join('bidders', 'winning_bids.winning_bidder_num', '=', 'bidders.idbidders')
winning_bidder_num ->groupBy('winning_bidder_num')
FROM winning_bids ->orderBy('bidders.bidder_assigned_number')
GROUP BY winning_bidder_num ->get();
ORDER BY winning_bidder_num
");
return view('winningbidderlist', ['winnerlist_results' => $winnerlist_results]); return view('winningbidderlist', ['winnerlist_results' => $winnerlist_results]);
} }
} }

View File

@ -17,7 +17,7 @@
// start first row // start first row
echo "<tr>"; echo "<tr>";
foreach($winnerlist_results as $winnerlist_result){ 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? // do we need a new row?
if($i % 8 === 0){ if($i % 8 === 0){
echo "</tr><tr>"; echo "</tr><tr>";