Before committing a transaction verify there is not an identical order placed by the same customer in the last 10-30 seconds. Its not very common users will be placing multiple orders within 10 seconds of each other.
As a side note locking will not normally help in situations like this (unless you lock the entire table or database
) since you cannot lock on items that do not exist such as a new purchase order.
[ January 04, 2006: Message edited by: Scott Selikoff ]