Hello,
I do an application to deal with products and shoping. I use MySQL as a database and PHP as a scripting language. I have a problem with the update of products table when

a client decide to order some products. The products table includes field named product_qty and this field is an integer. To perform the

order, the application should update the value of product_qty to substract the amount ordered of the product from the current value of

product_qty. The update query will be done several times equals to the number of products presented in the order list. Suppose other

clients already ordered a certin product which is already found in the order list, where, the value of product_qty will be less than zero and

this value is disallowed so one of the products in this client list will not be available.
The qusetion is, How can I stop all the update queries by this user if one of them could not be done. In other word, I want the MySQL

server to cancel all updates if one of them is could not to be done and prevent other clients to update while the current user doing an

update. Is this what they called "Transaction"?