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'. Quote Link to comment 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. Quote Link to comment 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.