Hi - Does anyone know to store the CURRENT TIME + 5 HOURS in MySQL using a 'Time' Field....? Many Thanks!!
There's a number of ways. Some examples: $query = "UPDATE tableName SET timeField = NOW() + INTERVAL 5 HOUR"; $query = "UPDATE tableName SET timeField = '" . date("Y-m-d H:i:s", time()+(5*3600)) . "'"; $query = "UPDATE tableName SET timeField = '" . date("Y-m-d H:i:s", strtotime("+5 hours")) . "'"; PHP:
Thanks guys! I originally had: ADDTIME(CURTIME(), '5:00') But that just added 5 as a number on - so if someone registered at 23:20 it would store as 28:20!! Thanks again