Jump to content

if stock_level < the entered quantity


laanes

Recommended Posts

Hello,

 

I am trying to build a query that looks into the number of products that are currently in stock, and if that is lower than the quantity entered in the cart then notify me that someone bought more items than in stock.

 

What kind of fields should i link to connect products and orders table?

 

There are:

 

product_id, product_code and order_id in the orders table.

 

product_id, product_code and stock_level in the products table.

 

With thanks,

laanes

 

 

Link to comment
https://forums.phpfreaks.com/topic/230810-if-stock_level-the-entered-quantity/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.