Mysql does not return timediff value

0

Good afternoon, I am putting together a trigger in which I need to return the difference between two DATETIMEs. I'm trying to use the code below, but mySQL does not return anything. If I run Select directly it returns without assigning a variable to it even mySQL returns the time correctly ... How can I solve this problem?

Q: I'm using PHPmyAdmin with mySQL version 5.7.22

SET @dh = "2018-11-23 00:00:00";
SET @tempo2 = (SELECT TIMEDIFF(@dh,now()));
    
asked by anonymous 27.11.2018 / 17:01

0 answers