ShoeLace1291 Posted May 17, 2007 Share Posted May 17, 2007 How do I use a mysql_query to set a DATETIME field? Link to comment https://forums.phpfreaks.com/topic/51757-set-datetime-fields-in-mysql/ Share on other sites More sharing options...
hitman6003 Posted May 17, 2007 Share Posted May 17, 2007 by executing an SQL query... mysql_query("INSERT INTO table_name (current_time) VALUES (NOW())") or die(mysql_error()); Link to comment https://forums.phpfreaks.com/topic/51757-set-datetime-fields-in-mysql/#findComment-254963 Share on other sites More sharing options...
ShoeLace1291 Posted May 17, 2007 Author Share Posted May 17, 2007 would that work with the UPDATE query? Link to comment https://forums.phpfreaks.com/topic/51757-set-datetime-fields-in-mysql/#findComment-254966 Share on other sites More sharing options...
hitman6003 Posted May 17, 2007 Share Posted May 17, 2007 did you try? Link to comment https://forums.phpfreaks.com/topic/51757-set-datetime-fields-in-mysql/#findComment-254968 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.