I'm wondering wether I can solve this with pure SQL statements: I've got a
shop system, with product-table, orders-table, an order_products table.
The goal was to have a stock system implemented in this, with a quick
overview of which orders currently can not be fullfilled due to lack of
stock. The problem therein is when an item is limited on stock, some
orders can be deliverd, others wil have to wait untill a new delivery. The
logic to be used is: first ordered, first in line for the product.
(Personally, as this is all 'pre-paid', I'd say: first ...