I'm trying to store the concatenation of current date, and time from another table, based on a comparison of a column in that table, I've tried this code, but it gives me mysql syntax error.What is wrong?
My Code:
UPDATE daily_table
SET
task_datetime = CASE
when master_table.check_day = 'Today' then concat(curdate(),' ',master_table.task_time)
when master_table.check_day = 'Tomorrow' then concat( date_add(curdate(),interval 1 day) ,' ', master_table.task_time)
CASE END
I'm using mysql and phpmyadmin.