convert winnerlist
This commit is contained in:
parent
07b056f680
commit
055934376e
@ -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]);
|
||||
}
|
||||
|
||||
|
@ -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){
|
||||
|
Loading…
Reference in New Issue
Block a user