I'm trying to make a simple shopping cart. Normally if product quantity is 0 buy now button will disappear and showing out of stock text.
Let's say current product have 1 quantity left and at the same time have two buyer buy the product. Both of buyers already in checkout page which script is not calculate available quantity any more.
In this case, how do I validate this part? I want the process basis on first-served, who is first insert into MySQL will get the product if not, script will return back to product page.
Let me know..