I have a database of bids on auctions that I keep separate from the auction 
information.  The problem comes when I attempt to generate a list of 
auctions with highest bid information.  I set the database for bids like this:

ANum, varchar(20), the auction number
Bidders, int(4), number of bidders at time of this bid
Bidder, varchar(50), username of current bidder
CPrice, decimal(9,2), current bid

Typical records:
12345  1  bidder1 20.00
12345  2  bidder2 25.00
12345  3  bidder3 30.00

I tried:  select ANum, max(Bidders), Bidder, CPrice from Bids group by ANum 
and it returns:

12345  3 bidder1 20.00

which gives me the higest bid number, but the information from the first 
bid in the database.  How can I retrieve the records that reflect the 
highest bids for each auction???

Thanx,
Jim


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to