I have a program and I have created a leaderboards online, it is going to show ‘Total Time Ran’ to update it I am using INSERT and
ON DUPLICATE KEY UPDATE Time=Time+'$time',
The problem with this is that it will insert fine and then show the first time but then when it comes to updating it using ON DUPLICATE it resets to 00:00:00, I have the program sending it in the hh:mm:ss format and in the databse, the field ‘Time’ uses the type ‘time’.
What can I change to make it so it works and doesn’t reset to 00:00:00 each time?
Thanks
Try to convert $time to seconds and use