Page 1 of 1

Need help on bidding site

Posted: Tue Jul 19, 2011 9:33 am
by manojujn
Hello friends,

Greetings for the day,

I am working on auction site, multiple users can bid on an :idea: auction.
Here is the url http://astealcentesimo.netsons.org/index.php
Now the problem is when i bid on the item repeatedly, and the conditions
doesn't match then dummy entry of winner goes into the database.
Ideally there should be only one winner, but when i click the bidding button
repeatedly, multiple entries of winner goes into the database.

The problem is, when one user click on the button record is not inserted yet
in the mean time other user click on it in the last moment ,
because the first record is not inserted yet so the if condition is not satisfied
so it accepts the second insert query also in this way we have two records for winner.

Can any one suggest me, solution for this problem.

:idea:

Thanks in advance

Re: Need help on bidding site

Posted: Tue Jul 19, 2011 10:38 pm
by McInfo
Use database transactions.