Currently I have an update that sets a column like this:
UPDATE ... SET date_time = DATE_SUB(NOW(), INTERVAL 8 DAY)
...
So, date_time will hold the current date minus 8 days. I have a variable in my PHP code that holds seconds. And I want to be able to subtract that from NOW() too. So, if this variable holds 299928 seconds ($seconds = 299928), I would like to be able to do:
UPDATE ... SET date_time = DATE_SUB(NOW(), INTERVAL 8 DAY, $seconds). I fail to see how would I convert those seconds in a way that I can use in my MYSQL query, taking into account that I also want to subtract the 8 day interval.
Thanks