Stock balance query
Sorry I wasn't clear.
The stock balance does get updated but not actually in the database.
My client is a service company who do repairs and sometimes uses the same stock. I have created additional pages in the admin to maintain their Technician work. One of the pages is to take parts from stock. I want to ensure that when they select a product/part from a dropdown list that there are sufficient item in stock.
I'm not a sql expert but was trying to modify your'll query to show the list of product but does show all the product.
If the quantity they select is in-sufficient, they get an error that says "The quantity you specified is not available in stock. The quantity field has been updated to reflect what is currently available."