alexx876

Untitled

Jun 24th, 2021
665
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. DELIMITER $$
  2. CREATE TRIGGER `returnMoney` before delete ON `likes`
  3. FOR EACH ROW BEGIN
  4.     UPDATE users SET money = money + (OLD.count-OLD.done)*OLD.price
  5.     WHERE users.id = OLD.user_id;
  6. END$$
  7. DELIMITER ;
RAW Paste Data