Duplicate result cause of left join

am having a duplicate result because of bids.
i need to limit the result for only auctions to 1, i tried “limit 1” but they all get limited to 1 both bids n auctions, how do i limit only auctions to 1
how do i go about this, thanks.

$query = "SELECT b.*, u.nick, a.id, a.team1, a.team2 FROM " . $DBPrefix . "bids b
LEFT JOIN " . $DBPrefix . "users u ON (u.id = b.bidder)
LEFT JOIN " . $DBPrefix . "auctions a ON (a.id = b.auction)
WHERE b.bidder NOT IN ('b.tagged') and b.tagged IN ('b.bidder') and b.auction = :auc_id";
$params = array();
$params[] = array(':auc_id', $id, 'int');
$db->query($query, $params);

hi all

solved

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.