fry2010 Posted February 25, 2009 Share Posted February 25, 2009 This is a real commen problem I have seen so many questions relating to this and none of them help at all. Does someone here know how to correctly insert dates into a mysql table? I have been using this but it doesnt work: $result = $conn2->query("INSERT INTO accountuser (joined) VALUE (CURDATE())"); I have also tried to use UPDATE instead as I have default values assigned to the table as '0000-00-00'. Link to comment https://forums.phpfreaks.com/topic/146949-solved-insert-date-into-mysql/ Share on other sites More sharing options...
fry2010 Posted February 25, 2009 Author Share Posted February 25, 2009 As always it was simple syntax error. Just couldnt locate what I was doing wrong. Basically because I had a default value set in the table, I had to use UPDATE and NOT INSERT. Theres something iv learned through this. Link to comment https://forums.phpfreaks.com/topic/146949-solved-insert-date-into-mysql/#findComment-771461 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.