convert winnerlist
This commit is contained in:
parent
07b056f680
commit
055934376e
@ -261,15 +261,10 @@ class PagesController extends Controller
|
|||||||
|
|
||||||
public function winnerlist()
|
public function winnerlist()
|
||||||
{
|
{
|
||||||
$winnerlist_results = DB::select("SELECT
|
$winnerlist_results = WinningBids::join('bidders', 'winning_bids.winning_bidder_num', '=', 'bidders.idbidders')
|
||||||
*, bidders.bidder_assigned_number, items.item_assigned_num
|
->groupBy('winning_bidder_num')
|
||||||
FROM winning_bids
|
->orderBy('bidders.bidder_assigned_number')
|
||||||
INNER JOIN bidders as bidders
|
->get();
|
||||||
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
|
|
||||||
");
|
|
||||||
return view('winnerlist', ['winnerlist_results' => $winnerlist_results]);
|
return view('winnerlist', ['winnerlist_results' => $winnerlist_results]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
foreach($winnerlist_results as $winnerlist_result){
|
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?
|
// do we need a new row?
|
||||||
if($i % 6 === 0){
|
if($i % 6 === 0){
|
||||||
|
Loading…
Reference in New Issue
Block a user