There are a couple of possible techniques. My favorite is to add an inventory field to your products database and store the insert date or update date when the inventory number was set.
Then make sure on your checkout that you are properly inserting an order date in the orders table and inserting the product details in the order details table.
With that done, you have enough information to do inventory control on your results and details pages.
With a little SQL you can subtract the number sold after the date the inventory was last updated and retrieve the new available quantity.
The only hand-coding necessary is to handle making sure people don't update the cart to a higher quantity if you allow quantity update, or to allow purchases up to that quantity and not more for items available in limited quantities. The same code can also be used to make sure the quantities are still available at checkout and that someone else didn't beat the user to the sale of a limited quantity item.
We will be releasing a store solution dealing with this concept built with eCart to help serve as a functional example.