I am tryin to substract 10 hours from the difference between starttime and endtime in the same query
SELECT id,
user_id,
starttid,
sluttid,
dato,
TIMEDIFF(sluttid, starttid) as hourDiff,
SUBBTIME(hourDiff, '10:00:00:0000') as overTime
FROM hours
WHERE user_id = :id
ORDER BY dato
My problem is that hourDiff does not work, it seems that mysql sees it as a column in this query.. - how can i do, what i am trying?