I am trying to do a link up between 3 tables to extract some auction data.
I have got it work and it gives me the results that I need. However the custom_fields table contains muliple data for the same auction and is trippling up when I output the results.
The output I get is as follows
PURCHASE_DATE AUCTION_ID NAME BID AMOUNT CUSTOM
1236782702 46273 COI TEST 5 MR FITNESS
1236782702 46273 COI TEST 5 1.23
1236782702 46273 COI TEST 5 Brand New
What I need to do is be able to group the custom so I get the following output
PURCHASE_DATE AUCTION_ID NAME BID AMOUNT CUSTOM
1236782702 46273 COI TEST 5 MR FITNESS 1.23 Brand New
This one is stumping me. Sorry about the formatting above.
MySQL Query is below:
SELECT a.purchase_date, b.auction_id, b.name, a.bid_amount, c.box_value AS custom
FROM winners a
LEFT JOIN auctions b ON b.auction_id = a.auction_id
LEFT JOIN custom_fields c ON c.owner_id = a.auction_id
WHERE seller_id =13358