Jump to content

duplicate result


skyhighweb

Recommended Posts

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);
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...