SHARE
TWEET

Untitled

a guest Jun 25th, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. UPDATE `order`
  2. SET `order`.`status` = 'complete'
  3. WHERE `order`.`status` <> 'complete'
  4. AND TIMESTAMPDIFF('DAY', `order`.`date`, now()) < 3;
  5.      
  6. CREATE EVENT IF NOT EXISTS `update_status_event`
  7. ON SCHEDULE
  8.     EVERY 19 DAY_HOUR
  9.     COMMENT 'Update the status every days at 19:00'
  10.     DO
  11.         UPDATE `order`
  12.         SET `order`.`status` = 'complete'
  13.         WHERE `order`.`status` <> 'complete'
  14.         AND TIMESTAMPDIFF('DAY', `order`.`date`, now()) < 3;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top