Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

trigger vérifier stock

 
BEGIN
 
UPDATE `product` 
    SET `price` =  NEW.price
    , `quantity` = NEW.quantity 
    , date_modified = NOW() 
    WHERE `product_id` = NEW.product_id;
    AND price > NEW.price 
    AND quantity > 0
;
 
END
Source by www.developpez.net #
 
PREVIOUS NEXT
Tagged: #trigger #stock
ADD COMMENT
Topic
Name
3+5 =