MYSQL -Incorrect Syntax
- by user1854392
WHILE x > 1 DO
SET x = x - 1;
SET totalTime = SELECT CONCAT(FLOOR(HOUR(TIMEDIFF(end_time,start_time)) / 24), ' days ',
MOD(HOUR(TIMEDIFF(end_time,start_time)), 24), ' hrs ',
MINUTE(TIMEDIFF(end_time,start_time)), ' minutes ') AS total_Time
I don't see why I am having a syntax error?
It is part of a bigger procedure but is pointing to this aas being incorrect
Error message:
SQL Error (1064): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near
'SELECT CONCAT(FLOOR(HOUR(TIMEDIFF(end_time,start_time)) / 24,' days',' at line 11
and totalTime is declared as a VARCHAR(50)