i'm developing a website with auctions. I've programmed my own auction system. The auctions run for a specific period of time, and users place their bid. The highest bidder at the ending time wins the auction (just like ebay). When the user places his/her bid, database checking is done if that was the highest bid and if it is, then the bid gets placed, else not.
Everything works great but the problem is that, i have kept my two laptops aside, logged in from different accounts and submitted the bids at the exact time and both of the bids gets placed (both the bids are greater than the current highest and both are equal). Two equal bids cannot be placed on the same product right? and this happens if two users submit the bid at the same time.
Can anybody tell the logic to get rid of this problem?