ShoeLace1291 Posted May 17, 2007 Share Posted May 17, 2007 How do I use a mysql_query to set a DATETIME field? Quote 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()); Quote 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? Quote 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? Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.