I have the following sql statement:
start_time = ADDDATE(start_time, INTERVAL $minuteDelta MINUTE),
end_time = ADDDATE(end_time, INTERVAL $minuteDelta MINUTE)
start_time
and end_time
are both time
fields in my database (not datetime)
$minuteDelta
is 60 for argument's sake
Right now it doesn't throw an error but resets my time fields to 00:00:00. Shouldn't this work? ADDTIME doesn't work because it doesn't accept an interval which is what my jQuery plugin is giving me (an interval). start_time and end_time have some value like 14:00:00 let's say.
I have a similar statement where I'm adding days to a date and it works fine. What's my problem here folks?
EDIT
Entire query
UPDATE events
SET start_date = DATE_ADD(start_date, INTERVAL 0 DAY),
end_date = DATE_ADD(end_date, INTERVAL 0 DAY),
start_time = ADDDATE(start_time, INTERVAL 60 MINUTE),
end_time = ADDDATE(end_time, INTERVAL 60 MINUTE)
WHERE id='1'