Jump to content

MySQL DateTime Insert


joecooper

Recommended Posts

$newtime = date("Y-m-d H:i:s", time() + 600);
mysql_query("UPDATE rounds SET clock = $newtime WHERE `round`='$CurrentRound' ") or die(mysql_error()); //update DB		

This code is failing to add the current time (+10 mins) to the MySQL database.

 

The cell in the database is datetime format.

 

I had done this before, but upon rewriting the code, it has stopped working.

Link to comment
https://forums.phpfreaks.com/topic/283417-mysql-datetime-insert/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.