Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // present inventory and further calculation is done here...
- foreach($products_info as $product_info) {
- $result = mysql_query("SELECT product, current_quantity FROM Quantities WHERE product=$product_info['product_id'] AND
- current_quantity=$product_info['minimum_quantity'];");
- if ($result) {
- $row = mysql_fetch_assoc($result);
- $msg = "Current stock for product $row['product'] is less than minimum stock of $product_info['minimum_quantity']. $current_quantity items are remaining in the stock.";
- mail($recipient, "Stock renewal needed, ", $msg);
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement