03.08.2018, 20:26
Quote:
It's great.Is there anything for example that amount can't be 0?(if it's 0 delete row).I just need it now.
|
I never used them with INSERT .. ON DUPLICATE so I am not sure. An example:
pawn Код:
CREATE TRIGGER remove_item BEFORE INSERT ON inventory
FOR EACH ROW
DELETE FROM inventory WHERE amount = 0;