I create an auction site for a client, and I have a problem when I need to remove bids from the bid table to a certain point, this point is determined by the number of bidders or the reserve price.
Let me explain further. I have a table with data:
Bidder1 $7,250.00 Sat 21 Jul 2012 12:25:44 Bidder2 $7,000.00 Sat 21 Jul 2012 12:26:34 Bidder1 $6,250.00 Sat 21 Jul 2012 12:25:44 Bidder2 $6,000.00 Sat 21 Jul 2012 12:26:11 Bidder1 $5,250.00 Sat 21 Jul 2012 12:25:44 Bidder2 $5,000.00 Sat 21 Jul 2012 12:25:34 Bidder2 $1,100.00 Sat 21 Jul 2012 12:23:53 Bidder1 $1,000.00 Sat 21 Jul 2012 12:22:33 Bidder1 $550.00 Sat 21 Jul 2012 12:22:33 Bidder2 $500.00 Sat 21 Jul 2012 12:22:23 Bidder2 $100.00 Sat 21 Jul 2012 12:22:23
As you can see, there are 2 bidders fighting it. Now each bidder can cancel his bids at any time, however, stating that the bidder2 cancels his bids, the flag system of all bids at the auction is canceled (clientβs request) not only their last. If this is the case (bidder 2 cancels his bids), then bids on bid 1 must return back to $ 1000, which is the reserve price for the auction (as you should be able to say, because there are 2 bids in a row from bidder 1, 550 and 1000 US dollars).
Here is what I hope, this is just a complex bit, not an impossible bit. Let's say I have 3 bidders:
Bidder1 $7,250.00 Sat 21 Jul 2012 12:25:44 Bidder2 $7,000.00 Sat 21 Jul 2012 12:26:34 Bidder3 $6,250.00 Sat 21 Jul 2012 12:25:44 Bidder2 $6,000.00 Sat 21 Jul 2012 12:26:11 Bidder1 $5,250.00 Sat 21 Jul 2012 12:25:44 Bidder2 $5,000.00 Sat 21 Jul 2012 12:25:34 Bidder3 $1,100.00 Sat 21 Jul 2012 12:23:53 Bidder1 $1,000.00 Sat 21 Jul 2012 12:22:33 Bidder1 $550.00 Sat 21 Jul 2012 12:22:33 Bidder2 $500.00 Sat 21 Jul 2012 12:22:23 Bidder2 $100.00 Sat 21 Jul 2012 12:22:23
If bidder 2 cancels his bids, I need a rollback to the last bid of bidder 3, but still with the winner. Winner.
Any guidance is appreciated.