I am putting together an inventory system which keeps count of the stock level.
I have the inventory database setup for example:

Product Stock_level
Battery1 25

Whenever "Battery 1" is bought, it adds a row to the "orders_products" table.

Is there a way where i can have an update button which will check to see if there are any new rows since the last press of the update button which will allow me to deduct 1 off the stock level of "Battery 1" ???

I hope I have made sense!

why don't you subtract one for the stock_level once the item is added to the orders_products table. thats how i would do it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.