UPDATE `user1734_monty`.`tasks` SET `tstop` = '1' WHERE `tasks`.`tedit` DATE_SUB(NOW(),INTERVAL 5 HOUR) > tedit; 

Generally update records that have tedit for more than 5 hours, but the request is swearing at DATE_SUB (NOW (), INTERVAL 5 HOUR)

How to be?

  • Pancake. WHERE tasks . tedit DATE_SUB (NOW (), INTERVAL 5 HOUR)> tedit What does this mean? - alexlz
  • tasks . tedit is somehow superfluous)). - Node_pro

1 answer 1

Try:

 UPDATE `user1734_monty`.`tasks` SET `tstop` = '1' WHERE tedit < DATE_SUB(NOW(),INTERVAL 5 HOUR);